functor: style

This commit is contained in:
Danny Robson 2020-02-25 16:15:21 +11:00
parent ebb99a6f4e
commit 1e3c342482

View File

@ -29,12 +29,12 @@ namespace cruft::functor {
/// A trivial functor that wraps std::begin without any static typing.
struct begin {
template <typename valuet>
template <typename ValueT>
decltype (auto)
operator() (valuet &&value) noexcept (noexcept (std::begin (value)))
operator() (ValueT &&value) noexcept (noexcept (std::begin (value)))
{
return std::begin (
std::forward<valuet> (value)
std::forward<ValueT> (value)
);
}
};
@ -42,12 +42,12 @@ namespace cruft::functor {
/// A trivial functor that wraps std::end without any static typing.
struct end {
template <typename valuet>
template <typename ValueT>
decltype (auto)
operator() (valuet &&value) noexcept (noexcept (std::end (value)))
operator() (ValueT &&value) noexcept (noexcept (std::end (value)))
{
return std::end (
std::forward<valuet> (value)
std::forward<ValueT> (value)
);
}
};