1 #ifndef SIPLASPLAS_UTILITY_IDENTITY_HPP 2 #define SIPLASPLAS_UTILITY_IDENTITY_HPP 25 constexpr
auto operator()(T&& value) -> decltype(std::forward<T>(value))
const 27 return std::forward<T>(value);
30 template<
typename T,
typename Function>
37 constexpr
auto type()
const 43 inline auto applyIdentity(
const Identity& identity)
45 return [identity](
auto&& value)
47 return identity(std::forward<decltype(value)>(value));
51 template<
typename T,
typename Identity>
52 constexpr
auto applyIdentity(
const Identity& identity) -> meta::type_t<decltype(identity.template
type<T>())>;
56 #endif // SIPLASPLAS_UTILITY_IDENTITY_HPP A functor class implementing the identity function.
Definition: identity.hpp:21
Definition: messaging.hpp:8
Definition: function.hpp:14