siplasplas
A library for C++ reflection and introspection
|
A functor class implementing the identity function. More...
#include <siplasplas/utility/identity.hpp>
A functor class implementing the identity function.
The identity function takes a value of any type and returns it as is. The function performs no mutation of the value. Given an expression x
decltype(x) == decltype(Identity()(x))
and the yield value is the same. This function is useful to delay the evaluation of an expression to the second template processing phase (The on instantiation phase). See cpp::staticIf or cpp::compiles.