functor: style
This commit is contained in:
parent
ebb99a6f4e
commit
1e3c342482
12
functor.hpp
12
functor.hpp
@ -29,12 +29,12 @@ namespace cruft::functor {
|
|||||||
|
|
||||||
/// A trivial functor that wraps std::begin without any static typing.
|
/// A trivial functor that wraps std::begin without any static typing.
|
||||||
struct begin {
|
struct begin {
|
||||||
template <typename valuet>
|
template <typename ValueT>
|
||||||
decltype (auto)
|
decltype (auto)
|
||||||
operator() (valuet &&value) noexcept (noexcept (std::begin (value)))
|
operator() (ValueT &&value) noexcept (noexcept (std::begin (value)))
|
||||||
{
|
{
|
||||||
return std::begin (
|
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.
|
/// A trivial functor that wraps std::end without any static typing.
|
||||||
struct end {
|
struct end {
|
||||||
template <typename valuet>
|
template <typename ValueT>
|
||||||
decltype (auto)
|
decltype (auto)
|
||||||
operator() (valuet &&value) noexcept (noexcept (std::end (value)))
|
operator() (ValueT &&value) noexcept (noexcept (std::end (value)))
|
||||||
{
|
{
|
||||||
return std::end (
|
return std::end (
|
||||||
std::forward<valuet> (value)
|
std::forward<ValueT> (value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user