Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
member_type.hpp File Reference
#include <boost/config.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/not.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/tti/gen/member_type_gen.hpp>
#include <boost/tti/gen/namespace_gen.hpp>
#include <boost/tti/detail/dmem_type.hpp>
#include <boost/tti/detail/dnotype.hpp>
Include dependency graph for member_type.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  boost::tti::valid_member_type< BOOST_TTI_TP_T, BOOST_TTI_TP_MARKER_TYPE >
 A metafunction which checks whether the member 'type' returned from invoking the macro metafunction generated by BOOST_TTI_MEMBER_TYPE ( BOOST_TTI_TRAIT_MEMBER_TYPE ) is a valid type. More...
 
struct  boost::tti::valid_member_metafunction< TTI_METAFUNCTION >
 A metafunction which checks whether the invoked macro metafunction generated by BOOST_TTI_MEMBER_TYPE ( BOOST_TTI_TRAIT_MEMBER_TYPE ) hold a valid type. More...
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::tti
 

Macros

#define BOOST_TTI_TRAIT_MEMBER_TYPE(trait, name)
 Expands to a metafunction whose typedef 'type' is either the named type or a marker type. More...
 
#define BOOST_TTI_MEMBER_TYPE(name)
 Expands to a metafunction whose typedef 'type' is either the named type or a marker type. More...
 

Macro Definition Documentation

#define BOOST_TTI_MEMBER_TYPE (   name)
Value:
( \
) \
const int name
Definition: gzip.hpp:94
#define BOOST_TTI_MEMBER_TYPE_GEN(name)
Generates the macro metafunction name for BOOST_TTI_MEMBER_TYPE.
Definition: member_type_gen.hpp:27
#define BOOST_TTI_TRAIT_MEMBER_TYPE(trait, name)
Expands to a metafunction whose typedef 'type' is either the named type or a marker type...
Definition: member_type.hpp:67

Expands to a metafunction whose typedef 'type' is either the named type or a marker type.

name = the name of the inner type.

generates a metafunction called "member_type_name" where 'name' is the macro parameter.

      template<class BOOST_TTI_TP_T,class BOOST_TTI_TP_MARKER_TYPE = boost::tti::detail::notype>
      struct member_type_name
        {
        typedef unspecified type;

        typedef BOOST_TTI_TP_MARKER_TYPE boost_tti_marker_type;
        };

      The metafunction types and return:

        BOOST_TTI_TP_T           = the enclosing type.
        BOOST_TTI_TP_MARKER_TYPE = (optional) a type to use as the marker type.
                          defaults to the internal boost::tti::detail::notype.

        returns         = 'type' is the inner type of 'name' if the inner type exists
                          within the enclosing type, else 'type' is a marker type.
                          if the end-user does not specify a marker type then
                          an internal boost::tti::detail::notype marker type is used.

        The metafunction also encapsulates the type of the marker type as
        a nested 'boost_tti_marker_type'.

The purpose of this macro is to encapsulate the 'name' type as the typedef 'type' of a metafunction, but only if it exists within the enclosing type. This allows for an evaluation of inner type existence, without generating a compiler error, which can be used by other metafunctions in this library.

#define BOOST_TTI_TRAIT_MEMBER_TYPE (   trait,
  name 
)
Value:
BOOST_TTI_DETAIL_TRAIT_HAS_TYPE_MEMBER_TYPE(trait,name) \
BOOST_TTI_DETAIL_TRAIT_MEMBER_TYPE(trait,name) \
template<class BOOST_TTI_TP_T,class BOOST_TTI_TP_MARKER_TYPE = BOOST_TTI_NAMESPACE::detail::notype> \
struct trait : \
boost::mpl::eval_if \
< \
BOOST_PP_CAT(trait,_detail)<BOOST_TTI_TP_T>, \
BOOST_PP_CAT(trait,_detail_member_type)<BOOST_TTI_TP_T>, \
boost::mpl::identity<BOOST_TTI_TP_MARKER_TYPE> \
> \
{ \
typedef BOOST_TTI_TP_MARKER_TYPE boost_tti_marker_type; \
}; \
const int name
Definition: gzip.hpp:94
#define BOOST_PP_CAT(a, b)
Definition: cat.hpp:24

Expands to a metafunction whose typedef 'type' is either the named type or a marker type.

trait = the name of the metafunction within the tti namespace.

name = the name of the inner type.

generates a metafunction called "trait" where 'trait' is the macro parameter.

      template<class BOOST_TTI_TP_T,class BOOST_TTI_TP_MARKER_TYPE = boost::tti::detail::notype>
      struct trait
        {
        typedef unspecified type;

        typedef BOOST_TTI_TP_MARKER_TYPE boost_tti_marker_type;
        };

      The metafunction types and return:

        BOOST_TTI_TP_T           = the enclosing type.
        BOOST_TTI_TP_MARKER_TYPE = (optional) a type to use as the marker type.
                          defaults to the internal boost::tti::detail::notype.

        returns         = 'type' is the inner type of 'name' if the inner type exists
                          within the enclosing type, else 'type' is a marker type.
                          if the end-user does not specify a marker type then
                          an internal boost::tti::detail::notype marker type is used.

        The metafunction also encapsulates the type of the marker type as
        a nested 'boost_tti_marker_type'.

The purpose of this macro is to encapsulate the 'name' type as the typedef 'type' of a metafunction, but only if it exists within the enclosing type. This allows for an evaluation of inner type existence, without generating a compiler error, which can be used by other metafunctions in this library.