...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Front Page / Metafunctions / Miscellaneous / always |
always<X> specialization is a variadic Metafunction Class always returning the same type, X, regardless of the number and types of passed arguments.
#include <boost/mpl/always.hpp>
Parameter | Requirement | Description |
---|---|---|
X | Any type | A type to be returned. |
For an arbitrary type x:
typedef always<x> f;
Return type: | Metafunction Class. |
---|---|
Semantics: | Equivalent to struct f : bind< identity<_1>, x > {}; |
typedef always<true_> always_true; BOOST_MPL_ASSERT(( apply< always_true,false_> )); BOOST_MPL_ASSERT(( apply< always_true,false_,false_ > )); BOOST_MPL_ASSERT(( apply< always_true,false_,false_,false_ > ));