.. Metafunctions/Miscellaneous//always |20 always ====== Synopsis -------- .. parsed-literal:: template< typename X > struct always { // |unspecified| // |...| }; Description ----------- ``always`` specialization is a variadic |Metafunction Class| always returning the same type, ``X``, regardless of the number and types of passed arguments. Header ------ .. parsed-literal:: #include Model of -------- |Metafunction Class| Parameters ---------- +---------------+-------------------+-----------------------------------+ | Parameter | Requirement | Description | +===============+===================+===================================+ | ``X`` | Any type | A type to be returned. | +---------------+-------------------+-----------------------------------+ Expression semantics -------------------- For an arbitrary type ``x``: .. parsed-literal:: typedef always f; :Return type: |Metafunction Class|. :Semantics: Equivalent to .. parsed-literal:: struct f : bind< identity<_1>, x > {}; Example ------- .. parsed-literal:: typedef always 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\_ > )); See also -------- |Metafunctions|, |Metafunction Class|, |identity|, |bind|, |apply|