identity¶
Header¶
#include <boost/hof/identity.hpp>
Description¶
The identity
function is an unary function object that returns whats given to it.
Semantics¶
assert(identity(x) == x);
Synopsis¶
template<class T>
constexpr T identity(T&& x);
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards