boost/libs/tti/doc/tti_reference.xml

1074 lines
84 KiB
XML
Raw Normal View History

2018-01-12 21:47:58 +01:00
<?xml version="1.0" standalone="yes"?>
2021-10-05 21:37:46 +02:00
<library-reference id="reference"><title>Reference</title><header name="boost/tti/gen/has_class_gen.hpp">
<macro name="BOOST_TTI_HAS_CLASS_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_CLASS. </purpose><description><para>name = the name of the class/struct.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
<header name="boost/tti/gen/has_data_gen.hpp">
<macro name="BOOST_TTI_HAS_DATA_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_DATA. </purpose><description><para>name = the name of the data.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
<header name="boost/tti/gen/has_enum_gen.hpp">
<macro name="BOOST_TTI_HAS_ENUM_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_ENUM. </purpose><description><para>name = the name of the enumeration.</para><para>returns = the generated macro metafunction name. </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
<header name="boost/tti/gen/has_function_gen.hpp">
2021-10-05 21:37:46 +02:00
<macro name="BOOST_TTI_HAS_FUNCTION_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_FUNCTION. </purpose><description><para>name = the name of the function.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
<header name="boost/tti/gen/has_function_template_gen.hpp">
<macro name="BOOST_TTI_HAS_FUNCTION_TEMPLATE_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_FUNCTION_TEMPLATE. </purpose><description><para>name = the name of the function template.</para><para>returns = the generated macro metafunction name. </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
<header name="boost/tti/gen/has_member_data_gen.hpp">
<macro name="BOOST_TTI_HAS_MEMBER_DATA_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_MEMBER_DATA. </purpose><description><para>name = the name of the member data.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
<header name="boost/tti/gen/has_member_function_gen.hpp">
<macro name="BOOST_TTI_HAS_MEMBER_FUNCTION_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_MEMBER_FUNCTION. </purpose><description><para>name = the name of the member function.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
2021-10-05 21:37:46 +02:00
<header name="boost/tti/gen/has_member_function_template_gen.hpp">
<macro name="BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE. </purpose><description><para>name = the name of the member function template.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
2018-01-12 21:47:58 +01:00
<header name="boost/tti/gen/has_static_member_data_gen.hpp">
<macro name="BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_STATIC_MEMBER_DATA. </purpose><description><para>name = the name of the static member data.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
<header name="boost/tti/gen/has_static_member_function_gen.hpp">
<macro name="BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION. </purpose><description><para>name = the name of the static member function.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
2021-10-05 21:37:46 +02:00
<header name="boost/tti/gen/has_static_member_function_template_gen.hpp">
<macro name="BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE. </purpose><description><para>name = the name of the static member function template.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
2018-01-12 21:47:58 +01:00
<header name="boost/tti/gen/has_template_gen.hpp">
<macro name="BOOST_TTI_HAS_TEMPLATE_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_TEMPLATE. </purpose><description><para>name = the name of the class template.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
<header name="boost/tti/gen/has_type_gen.hpp">
<macro name="BOOST_TTI_HAS_TYPE_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_TYPE. </purpose><description><para>name = the name of the type.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
2021-10-05 21:37:46 +02:00
<header name="boost/tti/gen/has_union_gen.hpp">
<macro name="BOOST_TTI_HAS_UNION_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_HAS_UNION. </purpose><description><para>name = the name of the union.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
2018-01-12 21:47:58 +01:00
<header name="boost/tti/gen/member_type_gen.hpp">
<macro name="BOOST_TTI_MEMBER_TYPE_GEN" kind="functionlike"><macro-parameter name="name"/><purpose>Generates the macro metafunction name for BOOST_TTI_MEMBER_TYPE. </purpose><description><para>name = the name of the inner type.</para><para>returns = the generated macro metafunction name. </para></description></macro>
</header>
<header name="boost/tti/gen/namespace_gen.hpp">
<macro name="BOOST_TTI_NAMESPACE"><purpose>Generates the name of the Boost TTI namespace. </purpose><description><para>returns = the generated name of the Boost TTI namespace. </para></description></macro>
</header>
2021-10-05 21:37:46 +02:00
<header name="boost/tti/has_class.hpp">
<macro name="BOOST_TTI_TRAIT_HAS_CLASS" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether an inner class/struct with a particular name exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_CLASS is a macro which expands to a metafunction. The metafunction tests whether an inner class/struct with a particular name exists and, optionally, whether an MPL lambda expression invoked with the inner class/struct is true or not. The macro takes the form of BOOST_TTI_TRAIT_HAS_CLASS(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner class/struct.</para><para>BOOST_TTI_TRAIT_HAS_CLASS generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_U&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_U = (optional) An optional template parameter, defaulting to a marker type.
If specified it is an MPL lambda expression which is invoked
with the inner class/struct found and must return a constant boolean
value.
returns = 'value' depends on whether or not the optional BOOST_TTI_TP_U is specified.
If BOOST_TTI_TP_U is not specified, then 'value' is true if the 'name' class/struct
exists within the enclosing type BOOST_TTI_TP_T; otherwise 'value' is false.
If BOOST_TTI_TP_U is specified , then 'value' is true if the 'name' class/struct exists
within the enclosing type BOOST_TTI_TP_T and the MPL lambda expression as specified
by BOOST_TTI_TP_U, invoked by passing the actual inner class/struct of 'name', returns
a 'value' of true; otherwise 'value' is false.
The action taken with BOOST_TTI_TP_U occurs only when the 'name' class/struct exists
within the enclosing type BOOST_TTI_TP_T.
</programlisting></para><para>Example usage:</para><para><programlisting language="c++">BOOST_TTI_TRAIT_HAS_CLASS(LookFor,MyType) generates the metafunction "LookFor" in the current scope
to look for an inner class/struct called MyType.
LookFor&lt;EnclosingType&gt;::value is true if MyType is an inner class/struct of EnclosingType, otherwise false.
LookFor&lt;EnclosingType,ALambdaExpression&gt;::value is true if MyType is an inner class/struct of EnclosingType
and invoking ALambdaExpression with the inner class/struct returns a value of true, otherwise false.
A popular use of the optional MPL lambda expression is to check whether the class/struct found is the same
as another type, when the class/struct found is a typedef. In that case our example would be:
LookFor&lt;EnclosingType,boost::is_same&lt;_,SomeOtherType&gt; &gt;::value is true if MyType is an inner class/struct
of EnclosingType and is the same type as SomeOtherType.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_CLASS" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether an inner class/struct with a particular name exists. </purpose><description><para>BOOST_TTI_HAS_CLASS is a macro which expands to a metafunction. The metafunction tests whether an inner class/struct with a particular name exists and, optionally, whether an MPL lambda expression invoked with the inner class/struct is true or not. The macro takes the form of BOOST_TTI_HAS_CLASS(name) where</para><para>name = the name of the inner class/struct.</para><para>BOOST_TTI_HAS_CLASS generates a metafunction called "has_class_'name'" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_U&gt;
struct has_class_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_U = (optional) An optional template parameter, defaulting to a marker type.
If specified it is an MPL lambda expression which is invoked
with the inner class/struct found and must return a constant boolean
value.
returns = 'value' depends on whether or not the optional BOOST_TTI_TP_U is specified.
If BOOST_TTI_TP_U is not specified, then 'value' is true if the 'name' class/struct
exists within the enclosing type BOOST_TTI_TP_T; otherwise 'value' is false.
If BOOST_TTI_TP_U is specified, then 'value' is true if the 'name' class/struct exists
within the enclosing type BOOST_TTI_TP_T and the MPL lambda expression as specified
by BOOST_TTI_TP_U, invoked by passing the actual inner class/struct of 'name', returns
a 'value' of true; otherwise 'value' is false.
The action taken with BOOST_TTI_TP_U occurs only when the 'name' class/struct exists
within the enclosing type BOOST_TTI_TP_T.
</programlisting></para><para>Example usage:</para><para><programlisting language="c++">BOOST_TTI_HAS_CLASS(MyType) generates the metafunction "has_class_MyType" in the current scope
to look for an inner class/struct called MyType.
has_class_MyType&lt;EnclosingType&gt;::value is true if MyType is an inner class/struct of EnclosingType, otherwise false.
has_class_MyType&lt;EnclosingType,ALambdaExpression&gt;::value is true if MyType is an inner class/struct of EnclosingType
and invoking ALambdaExpression with the inner class/struct returns a value of true, otherwise false.
A popular use of the optional MPL lambda expression is to check whether the class/struct found is the same
as another type, when the class/struct found is a typedef. In that case our example would be:
has_class_MyType&lt;EnclosingType,boost::is_same&lt;_,SomeOtherType&gt; &gt;::value is true if MyType is an inner class/struct
of EnclosingType and is the same type as SomeOtherType.
</programlisting> </para></description></macro>
</header>
2018-01-12 21:47:58 +01:00
<header name="boost/tti/has_data.hpp">
2021-10-05 21:37:46 +02:00
<macro name="BOOST_TTI_TRAIT_HAS_DATA" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether member data or static member data with a particular name and type exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_DATA is a macro which expands to a metafunction. The metafunction tests whether member data or static member data with a particular name and type exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_DATA(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner data.</para><para>BOOST_TTI_TRAIT_HAS_DATA generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_TYPE&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'
The enclosing type can be a class, struct, or union.
If the type is a union, static member data can only
be found if the C++11 unrestricted union is implemented
by the compiler being used, since prior to C++11 a union
could not have static data members.
BOOST_TTI_TP_TYPE = The type of the member data or static member.
returns = 'value' is true if the 'name' exists, with the correct data type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_DATA" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether member data or static member data with a particular name and type exists. </purpose><description><para>BOOST_TTI_HAS_DATA is a macro which expands to a metafunction. The metafunction tests whether member data or static member data with a particular name and type exists. The macro takes the form of BOOST_TTI_HAS_DATA(name) where</para><para>name = the name of the inner data.</para><para>BOOST_TTI_HAS_DATA generates a metafunction called "has_data_name" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_TYPE&gt;
struct has_data_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'
The enclosing type can be a class, struct, or union.
If the type is a union, static member data can only
be found if the C++11 unrestricted union is implemented
by the compiler being used, since prior to C++11 a union
could not have static data members.
BOOST_TTI_TP_TYPE = The type of the member data or static member.
returns = 'value' is true if the 'name' exists, with the correct data type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
</header>
<header name="boost/tti/has_enum.hpp">
<macro name="BOOST_TTI_TRAIT_HAS_ENUM" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether an inner enum with a particular name exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_ENUM is a macro which expands to a metafunction. The metafunction tests whether an inner enum with a particular name exists and, optionally, whether an MPL lambda expression invoked with the inner enum is true or not. The macro takes the form of BOOST_TTI_TRAIT_HAS_ENUM(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner enum. The name can be that of an enum or, in C++11 on up, an enum class.</para><para>BOOST_TTI_TRAIT_HAS_ENUM generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_U&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_U = (optional) An optional template parameter, defaulting to a marker type.
If specified it is an MPL lambda expression which is invoked
with the inner enum found and must return a constant boolean
value.
returns = 'value' depends on whether or not the optional BOOST_TTI_TP_U is specified.
If BOOST_TTI_TP_U is not specified, then 'value' is true if the 'name' enum
exists within the enclosing type BOOST_TTI_TP_T; otherwise 'value' is false.
If BOOST_TTI_TP_U is specified , then 'value' is true if the 'name' enum exists
within the enclosing type BOOST_TTI_TP_T and the MPL lambda expression as specified
by BOOST_TTI_TP_U, invoked by passing the actual inner enum of 'name', returns
a 'value' of true; otherwise 'value' is false.
The action taken with BOOST_TTI_TP_U occurs only when the 'name' enum exists
within the enclosing type BOOST_TTI_TP_T.
</programlisting></para><para>Example usage:</para><para><programlisting language="c++">BOOST_TTI_TRAIT_HAS_ENUM(LookFor,MyType) generates the metafunction LookFor in the current scope
to look for an inner enum called MyType.
LookFor&lt;EnclosingType&gt;::value is true if MyType is an inner enum of EnclosingType, otherwise false.
LookFor&lt;EnclosingType,ALambdaExpression&gt;::value is true if MyType is an inner enum of EnclosingType
and invoking ALambdaExpression with the inner enum returns a value of true, otherwise false.
A popular use of the optional MPL lambda expression is to check whether the enum found is the same
as another type, when the enum found is a typedef. In that case our example would be:
LookFor&lt;EnclosingType,boost::is_same&lt;_,SomeOtherType&gt; &gt;::value is true if MyType is an inner enum
of EnclosingType and is the same type as SomeOtherType.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_ENUM" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether an inner enum with a particular name exists. </purpose><description><para>BOOST_TTI_HAS_ENUM is a macro which expands to a metafunction. The metafunction tests whether an inner enum with a particular name exists and, optionally, whether an MPL lambda expression invoked with the inner enum is true or not. The macro takes the form of BOOST_TTI_HAS_ENUM(name) where</para><para>name = the name of the inner enum. The name can be that of an enum or, in C++11 on up, an enum class.</para><para>BOOST_TTI_HAS_ENUM generates a metafunction called "has_enum_'name'" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_U&gt;
struct has_enum_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_U = (optional) An optional template parameter, defaulting to a marker type.
If specified it is an MPL lambda expression which is invoked
with the inner enum found and must return a constant boolean
value.
returns = 'value' depends on whether or not the optional BOOST_TTI_TP_U is specified.
If BOOST_TTI_TP_U is not specified, then 'value' is true if the 'name' enum
exists within the enclosing type BOOST_TTI_TP_T; otherwise 'value' is false.
If BOOST_TTI_TP_U is specified, then 'value' is true if the 'name' enum exists
within the enclosing type BOOST_TTI_TP_T and the MPL lambda expression as specified
by BOOST_TTI_TP_U, invoked by passing the actual inner enum of 'name', returns
a 'value' of true; otherwise 'value' is false.
The action taken with BOOST_TTI_TP_U occurs only when the 'name' enum exists
within the enclosing type BOOST_TTI_TP_T.
</programlisting></para><para>Example usage:</para><para><programlisting language="c++">BOOST_TTI_HAS_ENUM(MyType) generates the metafunction has_enum_MyType in the current scope
to look for an inner enum called MyType.
has_enum_MyType&lt;EnclosingType&gt;::value is true if MyType is an inner enum of EnclosingType, otherwise false.
has_class_MyType&lt;EnclosingType,ALambdaExpression&gt;::value is true if MyType is an inner enum of EnclosingType
and invoking ALambdaExpression with the inner enum returns a value of true, otherwise false.
A popular use of the optional MPL lambda expression is to check whether the enum found is the same
as another type, when the enum found is a typedef. In that case our example would be:
has_enum_MyType&lt;EnclosingType,boost::is_same&lt;_,SomeOtherType&gt; &gt;::value is true if MyType is an inner enum
of EnclosingType and is the same type as SomeOtherType.
</programlisting> </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
<header name="boost/tti/has_function.hpp">
2021-10-05 21:37:46 +02:00
<macro name="BOOST_TTI_TRAIT_HAS_FUNCTION" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a member function or a static member function with a particular name and signature exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_FUNCTION is a macro which expands to a metafunction. The metafunction tests whether a member function or a static member function with a particular name and signature exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_FUNCTION(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner member.</para><para>BOOST_TTI_TRAIT_HAS_FUNCTION generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_R,class BOOST_TTI_TP_FS,class BOOST_TTI_TP_TAG&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_R = the return type of the function
BOOST_TTI_TP_FS = (optional) the parameters of the function as a boost::mpl forward sequence
if function parameters are not empty.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the function
if the need for a tag exists.
returns = 'value' is true if the 'name' exists,
with the appropriate static member function type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_FUNCTION" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a member function or a static member function with a particular name and signature exists. </purpose><description><para>BOOST_TTI_HAS_FUNCTION is a macro which expands to a metafunction. The metafunction tests whether a member function or a static member function with a particular name and signature exists. The macro takes the form of BOOST_TTI_HAS_FUNCTION(name) where</para><para>name = the name of the inner member.</para><para>BOOST_TTI_HAS_FUNCTION generates a metafunction called "has_function_name" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_R,class BOOST_TTI_TP_FS,class BOOST_TTI_TP_TAG&gt;
struct has_function_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_R = the return type of the function
BOOST_TTI_TP_FS = (optional) the parameters of the function as a boost::mpl forward sequence
if function parameters are not empty.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the function
if the need for a tag exists.
returns = 'value' is true if the 'name' exists,
with the appropriate function type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
</header>
<header name="boost/tti/has_function_template.hpp">
<macro name="BOOST_TTI_TRAIT_HAS_FUNCTION_TEMPLATE" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><macro-parameter name="..."/><purpose>A macro which expands to a metafunction which tests whether an inner member function template or static member function template with a particular name exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_FUNCTION_TEMPLATE is a macro which expands to a metafunction. The metafunction tests whether an inner member function template or static member function template with a particular name exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_FUNCTION_TEMPLATE(trait,name,...) where</para><para>trait = the name of the metafunction <sbr/>
name = inner member function template or static member function template name <sbr/>
... = variadic parameters.</para><para>The variadic parameter(s) are either:</para><para>A sequence of valid instantiations for the static member function template parameters ie. 'int,long,double' etc.</para><para>or</para><para>A single variadic parameter which is a Boost PP array whose elements are a sequence of valid instantiations for the static member function template parameters ie. '(3,(int,long,double))' etc. This form is allowed in order to be compatible with using the non-variadic form of this macro.</para><para>BOOST_TTI_TRAIT_HAS_FUNCTION_TEMPLATE generates a metafunction called "trait" where 'trait' is the first macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_R,class BOOST_TTI_FS,class BOOST_TTI_TAG&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_R = the return type of the function template
in a single instantiation of the function template
BOOST_TTI_TP_FS = (optional) the parameters of the function template as a boost::mpl forward sequence
if the function template parameters are not empty. These parameters are a single
instantiation of the function template.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the function template
if a tag is needed.
returns = 'value' is true if the 'name' exists,
with the appropriate member function template or static member function template type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_FUNCTION_TEMPLATE" kind="functionlike"><macro-parameter name="name"/><macro-parameter name="..."/><purpose>A macro which expands to a metafunction which tests whether an inner member function template or static member function template with a particular name exists. </purpose><description><para>BOOST_TTI__HAS_FUNCTION_TEMPLATE is a macro which expands to a metafunction. The metafunction tests whether an inner member function template or static member function template with a particular name exists. The macro takes the form of BOOST_TTI_HAS_FUNCTION_TEMPLATE(name,...) where</para><para>name = inner member function template or static member function template name <sbr/>
... = variadic parameters.</para><para>The variadic parameter(s) are either:</para><para>A sequence of valid instantiations for the static member function template parameters ie. 'int,long,double' etc.</para><para>or</para><para>A single variadic parameter which is a Boost PP array whose elements are a sequence of valid instantiations for the static member function template parameters ie. '(3,(int,long,double))' etc. This form is allowed in order to be compatible with using the non-variadic form of this macro.</para><para>BOOST_TTI_HAS_FUNCTION_TEMPLATE generates a metafunction called "has_function_template_'name'" where 'name' is the first macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_R,class BOOST_TTI_FS,class BOOST_TTI_TAG&gt;
struct has_function_template_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_R = the return type of the function template
in a single instantiation of the function template
BOOST_TTI_TP_FS = (optional) the parameters of the function template as a boost::mpl forward sequence
if the function template parameters are not empty. These parameters are a single
instantiation of the function template.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the function template
if a tag is needed.
returns = 'value' is true if the 'name' exists,
with the appropriate member function template or static member function template type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
<header name="boost/tti/has_member_data.hpp">
2021-10-05 21:37:46 +02:00
<macro name="BOOST_TTI_TRAIT_HAS_MEMBER_DATA" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether member data with a particular name and type exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_MEMBER_DATA is a macro which expands to a metafunction. The metafunction tests whether member data with a particular name and type exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_MEMBER_DATA(trait,name) where</para><para>trait = the name of the metafunction. <sbr/>
name = the name of the inner member data.</para><para>BOOST_TTI_TRAIT_HAS_MEMBER_DATA generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_ET,class BOOST_TTI_TP_TYPE&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_ET = the enclosing type in which to look for our 'name'
The enclosing type can be a class, struct, or union.
OR
The type of the member data in the form of a pointer
to member data.
BOOST_TTI_TP_TYPE = (optional) The type of the member data if the first
parameter is the enclosing type.
returns = 'value' is true if the 'name' exists, with the correct data type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_MEMBER_DATA" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a member data with a particular name and type exists. </purpose><description><para>BOOST_TTI_HAS_MEMBER_DATA is a macro which expands to a metafunction. The metafunction tests whether member data with a particular name and type exists. The macro takes the form of BOOST_TTI_HAS_MEMBER_DATA(name) where</para><para>name = the name of the inner member.</para><para>BOOST_TTI_HAS_MEMBER_DATA generates a metafunction called "has_member_data_name" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_ET,class BOOST_TTI_TP_TYPE&gt;
struct has_member_data_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_ET = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
OR
The type of the member data in the form of a pointer
to member data.
BOOST_TTI_TP_TYPE = (optional) The type of the member data if the first
parameter is the enclosing type.
returns = 'value' is true if the 'name' exists, with the correct data type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
<header name="boost/tti/has_member_function.hpp">
2021-10-05 21:37:46 +02:00
<macro name="BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a member function with a particular name and signature exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION is a macro which expands to a metafunction. The metafunction tests whether a member function with a particular name and signature exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner member.</para><para>BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_R,class BOOST_TTI_FS,class BOOST_TTI_TAG&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
OR
a pointer to member function as a single type.
BOOST_TTI_TP_R = (optional) the return type of the member function
if the first parameter is the enclosing type.
BOOST_TTI_TP_FS = (optional) the parameters of the member function as a boost::mpl forward sequence
if the first parameter is the enclosing type and the member function parameters
are not empty.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the member function
if the first parameter is the enclosing type and a tag is needed.
returns = 'value' is true if the 'name' exists,
with the appropriate member function type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_MEMBER_FUNCTION" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a member function with a particular name and signature exists. </purpose><description><para>BOOST_TTI_HAS_MEMBER_FUNCTION is a macro which expands to a metafunction. The metafunction tests whether a member function with a particular name and signature exists. The macro takes the form of BOOST_TTI_HAS_MEMBER_FUNCTION(name) where</para><para>name = the name of the inner member.</para><para>BOOST_TTI_HAS_MEMBER_FUNCTION generates a metafunction called "has_member_function_name" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_R,class BOOST_TTI_TP_FS,class BOOST_TTI_TP_TAG&gt;
struct has_member_function_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
OR
a pointer to member function as a single type.
BOOST_TTI_TP_R = (optional) the return type of the member function
if the first parameter is the enclosing type.
BOOST_TTI_TP_FS = (optional) the parameters of the member function as a boost::mpl forward sequence
if the first parameter is the enclosing type and the member function parameters
are not empty.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the member function
if the first parameter is the enclosing type and a tag is needed.
returns = 'value' is true if the 'name' exists,
with the appropriate member function type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
</header>
<header name="boost/tti/has_member_function_template.hpp">
<macro name="BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><macro-parameter name="..."/><purpose>A macro which expands to a metafunction which tests whether an inner member function template with a particular name exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE is a macro which expands to a metafunction. The metafunction tests whether an inner member function template with a particular name exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,...) where</para><para>trait = the name of the metafunction <sbr/>
name = inner member function template name <sbr/>
... = variadic parameters.</para><para>The variadic parameter(s) are either:</para><para>A sequence of valid instantiations for the member function template parameters ie. 'int,long,double' etc.</para><para>or</para><para>A single variadic parameter which is a Boost PP array whose elements are a sequence of valid instantiations for the member function template parameters ie. '(3,(int,long,double))' etc. This form is allowed in order to be compatible with using the non-variadic form of this macro.</para><para>BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE generates a metafunction called "trait" where 'trait' is the first macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_R,class BOOST_TTI_FS,class BOOST_TTI_TAG&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
OR
a pointer to member function as a single type
which encapsulates a single instantiation of
the member function template.
BOOST_TTI_TP_R = (optional) the return type of the member function template
in a single instantiation of the member function template
if the first parameter is the enclosing type.
BOOST_TTI_TP_FS = (optional) the parameters of the member function template as a boost::mpl forward sequence
if the first parameter is the enclosing type and the member function template parameters
are not empty. These parameters are a single instantiation of the member function template.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the member function template
if the first parameter is the enclosing type and a tag is needed.
returns = 'value' is true if the 'name' exists,
with the appropriate member function template type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE" kind="functionlike"><macro-parameter name="name"/><macro-parameter name="..."/><purpose>A macro which expands to a metafunction which tests whether an inner member function template with a particular name exists. </purpose><description><para>BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE is a macro which expands to a metafunction. The metafunction tests whether an inner member function template with a particular name exists. The macro takes the form of BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE(name,...) where</para><para>name = inner member function template name <sbr/>
... = variadic parameters.</para><para>The variadic parameter(s) are either:</para><para>A sequence of valid instantiations for the member function template parameters ie. 'int,long,double' etc.</para><para>or</para><para>A single variadic parameter which is a Boost PP array whose elements are a sequence of valid instantiations for the member function template parameters ie. '(3,(int,long,double))' etc. This form is allowed in order to be compatible with using the non-variadic form of this macro.</para><para>BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE generates a metafunction called "has_member_function_template_'name'" where 'name' is the first macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_R,class BOOST_TTI_FS,class BOOST_TTI_TAG&gt;
struct has_member_function_template_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
OR
a pointer to member function as a single type
which encapsulates a single instantiation of
the member function template.
BOOST_TTI_TP_R = (optional) the return type of the member function template
in a single instantiation of the member function template
if the first parameter is the enclosing type.
BOOST_TTI_TP_FS = (optional) the parameters of the member function template as a boost::mpl forward sequence
if the first parameter is the enclosing type and the member function template parameters
are not empty. These parameters are a single instantiation of the member function template.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the member function template
if the first parameter is the enclosing type and a tag is needed.
returns = 'value' is true if the 'name' exists,
with the appropriate member function template type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
<header name="boost/tti/has_static_member_data.hpp">
2021-10-05 21:37:46 +02:00
<macro name="BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_DATA" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a static member data with a particular name and type exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_DATA is a macro which expands to a metafunction. The metafunction tests whether static member data with a particular name and type exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner member.</para><para>BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_DATA generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_TYPE&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type.
The enclosing type can be a class, struct, or union.
If the type is a union, static member data can only
be found if the C++11 unrestricted union is implemented
by the compiler being used, since prior to C++11 a union
could not have static data members.
BOOST_TTI_TP_TYPE = the type of the static member data.
returns = 'value' is true if the 'name' exists,
with the BOOST_TTI_TP_TYPE type,
within the enclosing BOOST_TTI_TP_T type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_STATIC_MEMBER_DATA" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a static member data with a particular name and type exists. </purpose><description><para>BOOST_TTI_HAS_STATIC_MEMBER_DATA is a macro which expands to a metafunction. The metafunction tests whether static member data with a particular name and type exists. The macro takes the form of BOOST_TTI_HAS_STATIC_MEMBER_DATA(name) where</para><para>name = the name of the inner member.</para><para>BOOST_TTI_HAS_STATIC_MEMBER_DATA generates a metafunction called "has_static_member_data_name" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_TYPE&gt;
struct has_static_member_data_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type.
The enclosing type can be a class, struct, or union.
If the type is a union, static member data can only
be found if the C++11 unrestricted union is implemented
by the compiler being used, since prior to C++11 a union
could not have static data members.
BOOST_TTI_TP_TYPE = the type of the static member data.
returns = 'value' is true if the 'name' exists,
with the appropriate BOOST_TTI_TP_TYPE type,
within the enclosing BOOST_TTI_TP_T type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
<header name="boost/tti/has_static_member_function.hpp">
2021-10-05 21:37:46 +02:00
<macro name="BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a static member function with a particular name and signature exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION is a macro which expands to a metafunction. The metafunction tests whether a static member function with a particular name and signature exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner member.</para><para>BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_R,class BOOST_TTI_TP_FS,class BOOST_TTI_TP_TAG&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_R = the return type of the static member function
OR
the signature of a function in the form of Return_Type ( Parameter_Types )
BOOST_TTI_TP_FS = (optional) the parameters of the static member function as a boost::mpl forward sequence
if the second parameter is a return type and the function parameters exist.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the static member function
if the second parameter is a return type and the need for a tag exists.
returns = 'value' is true if the 'name' exists,
with the appropriate static member function type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether a static member function with a particular name and signature exists. </purpose><description><para>BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION is a macro which expands to a metafunction. The metafunction tests whether a static member function with a particular name and signature exists. The macro takes the form of BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION(name) where</para><para>name = the name of the inner member.</para><para>BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION generates a metafunction called "has_static_member_function_name" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_R,class BOOST_TTI_TP_FS,class BOOST_TTI_TP_TAG&gt;
struct has_static_member_function_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_R = the return type of the static member function
OR
the signature of a function in the form of Return_Type ( Parameter_Types )
BOOST_TTI_TP_FS = (optional) the parameters of the static member function as a boost::mpl forward sequence
if the second parameter is a return type and the function parameters exist.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the static member function
if the second parameter is a return type and the need for a tag exists.
returns = 'value' is true if the 'name' exists,
with the appropriate static member function type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
</header>
<header name="boost/tti/has_static_member_function_template.hpp">
<macro name="BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><macro-parameter name="..."/><purpose>A macro which expands to a metafunction which tests whether an inner static member function template with a particular name exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE is a macro which expands to a metafunction. The metafunction tests whether an inner static member function template with a particular name exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,...) where</para><para>trait = the name of the metafunction <sbr/>
name = inner static member function template name <sbr/>
... = variadic parameters.</para><para>The variadic parameter(s) are either:</para><para>A sequence of valid instantiations for the static member function template parameters ie. 'int,long,double' etc.</para><para>or</para><para>A single variadic parameter which is a Boost PP array whose elements are a sequence of valid instantiations for the static member function template parameters ie. '(3,(int,long,double))' etc. This form is allowed in order to be compatible with using the non-variadic form of this macro.</para><para>BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE generates a metafunction called "trait" where 'trait' is the first macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_R,class BOOST_TTI_FS,class BOOST_TTI_TAG&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_R = the return type of the static member function template
in a single instantiation of the static member function template
OR
a pointer to function as a single type
which encapsulates a single instantiation of
the static member function template.
BOOST_TTI_TP_FS = (optional) the parameters of the static member function template as a boost::mpl forward sequence
if the second parameter is the enclosing type and the static member function template parameters
are not empty. These parameters are a single instantiation of the static member function template.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the static member function template
if the second parameter is the enclosing type and a tag is needed.
returns = 'value' is true if the 'name' exists,
with the appropriate static member function template type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE" kind="functionlike"><macro-parameter name="name"/><macro-parameter name="..."/><purpose>A macro which expands to a metafunction which tests whether an inner static member function template with a particular name exists. </purpose><description><para>BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE is a macro which expands to a metafunction. The metafunction tests whether an inner static member function template with a particular name exists. The macro takes the form of BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(name,...) where</para><para>name = inner static member function template name <sbr/>
... = variadic parameters.</para><para>The variadic parameter(s) are either:</para><para>A sequence of valid instantiations for the static member function template parameters ie. 'int,long,double' etc.</para><para>or</para><para>A single variadic parameter which is a Boost PP array whose elements are a sequence of valid instantiations for the static member function template parameters ie. '(3,(int,long,double))' etc. This form is allowed in order to be compatible with using the non-variadic form of this macro.</para><para>BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE generates a metafunction called "has_static_member_function_template_'name'" where 'name' is the first macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_R,class BOOST_TTI_FS,class BOOST_TTI_TAG&gt;
struct has_static_member_function_template_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_R = the return type of the static member function template
in a single instantiation of the static member function template
OR
a pointer to function as a single type
which encapsulates a single instantiation of
the static member function template.
BOOST_TTI_TP_FS = (optional) the parameters of the static member function template as a boost::mpl forward sequence
if the second parameter is the enclosing type and the static member function template parameters
are not empty. These parameters are a single instantiation of the static member function template.
BOOST_TTI_TP_TAG = (optional) a boost::function_types tag to apply to the static member function template
if the second parameter is the enclosing type and a tag is needed.
returns = 'value' is true if the 'name' exists,
with the appropriate static member function template type,
otherwise 'value' is false.
</programlisting> </para></description></macro>
</header>
<header name="boost/tti/has_template.hpp">
<macro name="BOOST_TTI_TRAIT_HAS_TEMPLATE" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="..."/><purpose>A macro which expands to a metafunction which tests whether an inner class template with a particular name exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_TEMPLATE is a macro which expands to a metafunction. The metafunction tests whether an inner class template with a particular name exists. The macro takes the form of BOOST_TTI_TRAIT_HAS_TEMPLATE(trait,...) where</para><para>trait = the name of the metafunction <sbr/>
... = variadic parameters.</para><para>The first variadic parameter is the inner class template name.</para><para>Following variadic parameters are optional.</para><para>If no following variadic parameters exist, then the inner class template being introspected must be all template type parameters ( template parameters starting with <computeroutput>class</computeroutput> or <computeroutput>typename</computeroutput> ) and any number of template type parameters can occur.</para><para>If the second variadic parameter is BOOST_PP_NIL and no other variadic parameter is given, then just as in the previous case the inner class template being introspected must be all template type parameters ( template parameters starting with <computeroutput>class</computeroutput> or <computeroutput>typename</computeroutput> ) and any number of template type parameters can occur. This form is allowed in order to be consistent with using the non-variadic form of this macro.</para><para>If the second variadic parameter is a Boost preprocessor library array and no other variadic parameter is given, then the inner class template must have its template parameters matching the sequence in the tuple portion of the Boost PP array. This form is allowed in order to be consistent with using the non-variadic form of this macro.</para><para>Otherwise the inner class template must have its template parameters matching the sequence of the optional variadic parameters.</para><para>BOOST_TTI_TRAIT_HAS_TEMPLATE generates a metafunction called "trait" where 'trait' is the first macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
The metafunction types and return:
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
returns = 'value' is true if the 'name' template exists within the enclosing type,
otherwise 'value' is false.
</programlisting></para><para>Examples:</para><para><programlisting language="c++">1) Search for an inner class template called 'MyTemplate', with all template type parameters,
nested within the class 'MyClass' using a metafunction name of 'MyMeta'.
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_TRAIT_HAS_TEMPLATE(MyMeta,MyTemplate)
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
or
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_TRAIT_HAS_TEMPLATE(MyMeta,MyTemplate,BOOST_PP_NIL) // Non-variadic macro form
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
MyMeta&lt;MyClass&gt;::value
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
is a compile time boolean constant which is either 'true' or 'false'
if the nested template exists.
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
2) Search for an inner class template called 'MyTemplate', with template parameters
of 'class T,int x,template&lt;class&gt; class U', nested within the class 'MyClass'
using a metafunction name of 'MyMeta'.
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_TRAIT_HAS_TEMPLATE(MyMeta,MyTemplate,class,int,template&lt;class&gt; class)
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
or
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_TRAIT_HAS_TEMPLATE(MyMeta,MyTemplate,(3,(class,int,template&lt;class&gt; class))) // Non-variadic macro form
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
MyMeta&lt;MyClass&gt;::value
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
is a compile time boolean constant which is either 'true' or 'false'
if the nested template exists.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_TEMPLATE" kind="functionlike"><macro-parameter name="..."/><purpose>A macro which expands to a metafunction which tests whether an inner class template with a particular name exists. </purpose><description><para>BOOST_TTI_HAS_TEMPLATE is a macro which expands to a metafunction. The metafunction tests whether an inner class template with a particular name exists. The macro takes the form of BOOST_TTI_HAS_TEMPLATE(...) where</para><para>... = variadic parameters.</para><para>The first variadic parameter is the inner class template name.</para><para>Following variadic parameters are optional.</para><para>If no following variadic parameters exist, then the inner class template being introspected must be all template type parameters ( template parameters starting with <computeroutput>class</computeroutput> or <computeroutput>typename</computeroutput> ) and any number of template type parameters can occur.</para><para>If the second variadic parameter is BOOST_PP_NIL and no other variadic parameter is given, then just as in the previous case the inner class template being introspected must be all template type parameters ( template parameters starting with <computeroutput>class</computeroutput> or <computeroutput>typename</computeroutput> ) and any number of template type parameters can occur. This form is allowed in order to be consistent with using the non-variadic form of this macro.</para><para>If the second variadic parameter is a Boost preprocessor library array and no other variadic parameter is given, then the inner class template must have its template parameters matching the sequence in the tuple portion of the Boost PP array. This form is allowed in order to be consistent with using the non-variadic form of this macro.</para><para>Otherwise the inner class template must have its template parameters matching the sequence of the optional variadic parameters.</para><para>BOOST_TTI_HAS_TEMPLATE generates a metafunction called "has_template_'name'" where 'name' is the first variadic parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T&gt;
struct has_template_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
The metafunction types and return:
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
returns = 'value' is true if the 'name' template exists within the enclosing type,
otherwise 'value' is false.
</programlisting></para><para>Examples:</para><para><programlisting language="c++">1) Search for an inner class template called 'MyTemplate', with all template type parameters,
nested within the class 'MyClass'.
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_HAS_TEMPLATE(MyTemplate)
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
or
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_HAS_TEMPLATE(MyTemplate,BOOST_PP_NIL) // Non-variadic macro form
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
has_template_MyTemplate&lt;MyClass&gt;::value
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
is a compile time boolean constant which is either 'true' or 'false'
if the nested template exists.
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
2) Search for an inner class template called 'MyTemplate' with template parameters
of 'class T,int x,template&lt;class&gt; class U' nested within the class 'MyClass'.
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_HAS_TEMPLATE(MyTemplate,class,int,template&lt;class&gt; class)
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
or
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
BOOST_TTI_HAS_TEMPLATE(MyTemplate,(3,(class,int,template&lt;class&gt; class))) // Non-variadic macro form
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
has_template_MyTemplate&lt;MyClass&gt;::value
2018-01-12 21:47:58 +01:00
2021-10-05 21:37:46 +02:00
is a compile time boolean constant which is either 'true' or 'false'
if the nested template exists.
</programlisting> </para></description></macro>
</header>
<header name="boost/tti/has_type.hpp">
<macro name="BOOST_TTI_TRAIT_HAS_TYPE" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether an inner type with a particular name exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_TYPE is a macro which expands to a metafunction. The metafunction tests whether an inner type with a particular name exists and, optionally, whether an MPL lambda expression invoked with the inner type is true or not. The macro takes the form of BOOST_TTI_TRAIT_HAS_TYPE(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner type.</para><para>BOOST_TTI_TRAIT_HAS_TYPE generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_U&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_U = (optional) An optional template parameter, defaulting to a marker type.
If specified it is an MPL lambda expression which is invoked
with the inner type found and must return a constant boolean
value.
returns = 'value' depends on whether or not the optional BOOST_TTI_TP_U is specified.
If BOOST_TTI_TP_U is not specified, then 'value' is true if the 'name' type
exists within the enclosing type BOOST_TTI_TP_T; otherwise 'value' is false.
If BOOST_TTI_TP_U is specified , then 'value' is true if the 'name' type exists
within the enclosing type BOOST_TTI_TP_T and the MPL lambda expression as specified
by BOOST_TTI_TP_U, invoked by passing the actual inner type of 'name', returns
a 'value' of true; otherwise 'value' is false.
The action taken with BOOST_TTI_TP_U occurs only when the 'name' type exists
within the enclosing type BOOST_TTI_TP_T.
</programlisting></para><para>Example usage:</para><para><programlisting language="c++">BOOST_TTI_TRAIT_HAS_TYPE(LookFor,MyType) generates the metafunction LookFor in the current scope
to look for an inner type called MyType.
LookFor&lt;EnclosingType&gt;::value is true if MyType is an inner type of EnclosingType, otherwise false.
LookFor&lt;EnclosingType,ALambdaExpression&gt;::value is true if MyType is an inner type of EnclosingType
and invoking ALambdaExpression with the inner type returns a value of true, otherwise false.
A popular use of the optional MPL lambda expression is to check whether the type found is the same
as another type, when the type found is a typedef. In that case our example would be:
LookFor&lt;EnclosingType,boost::is_same&lt;_,SomeOtherType&gt; &gt;::value is true if MyType is an inner type
of EnclosingType and is the same type as SomeOtherType.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_TYPE" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether an inner type with a particular name exists. </purpose><description><para>BOOST_TTI_HAS_TYPE is a macro which expands to a metafunction. The metafunction tests whether an inner type with a particular name exists and, optionally, whether an MPL lambda expression invoked with the inner type is true or not. The macro takes the form of BOOST_TTI_HAS_TYPE(name) where</para><para>name = the name of the inner type.</para><para>BOOST_TTI_HAS_TYPE generates a metafunction called "has_type_'name'" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_U&gt;
struct has_type_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_U = (optional) An optional template parameter, defaulting to a marker type.
If specified it is an MPL lambda expression which is invoked
with the inner type found and must return a constant boolean
value.
returns = 'value' depends on whether or not the optional BOOST_TTI_TP_U is specified.
If BOOST_TTI_TP_U is not specified, then 'value' is true if the 'name' type
exists within the enclosing type BOOST_TTI_TP_T; otherwise 'value' is false.
If BOOST_TTI_TP_U is specified , then 'value' is true if the 'name' type exists
within the enclosing type BOOST_TTI_TP_T and the MPL lambda expression as specified
by BOOST_TTI_TP_U, invoked by passing the actual inner type of 'name', returns
a 'value' of true; otherwise 'value' is false.
The action taken with BOOST_TTI_TP_U occurs only when the 'name' type exists
within the enclosing type BOOST_TTI_TP_T.
</programlisting></para><para>Example usage:</para><para><programlisting language="c++">BOOST_TTI_HAS_TYPE(MyType) generates the metafunction has_type_MyType in the current scope
to look for an inner type called MyType.
has_type_MyType&lt;EnclosingType&gt;::value is true if MyType is an inner type of EnclosingType, otherwise false.
has_type_MyType&lt;EnclosingType,ALambdaExpression&gt;::value is true if MyType is an inner type of EnclosingType
and invoking ALambdaExpression with the inner type returns a value of true, otherwise false.
A popular use of the optional MPL lambda expression is to check whether the type found is the same
as another type, when the type found is a typedef. In that case our example would be:
has_type_MyType&lt;EnclosingType,boost::is_same&lt;_,SomeOtherType&gt; &gt;::value is true if MyType is an inner type
of EnclosingType and is the same type as SomeOtherType.
</programlisting> </para></description></macro>
</header>
<header name="boost/tti/has_union.hpp">
<macro name="BOOST_TTI_TRAIT_HAS_UNION" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether an inner union with a particular name exists. </purpose><description><para>BOOST_TTI_TRAIT_HAS_UNION is a macro which expands to a metafunction. The metafunction tests whether an inner union with a particular name exists and, optionally, whether an MPL lambda expression invoked with the inner union is true or not. The macro takes the form of BOOST_TTI_TRAIT_HAS_UNION(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner union.</para><para>BOOST_TTI_TRAIT_HAS_UNION generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_U&gt;
struct trait
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
The enclosing type can be a class, struct, or union.
BOOST_TTI_TP_U = (optional) An optional template parameter, defaulting to a marker type.
If specified it is an MPL lambda expression which is invoked
with the inner union found and must return a constant boolean
value.
returns = 'value' depends on whether or not the optional BOOST_TTI_TP_U is specified.
If BOOST_TTI_TP_U is not specified, then 'value' is true if the 'name' union
exists within the enclosing type BOOST_TTI_TP_T; otherwise 'value' is false.
If BOOST_TTI_TP_U is specified , then 'value' is true if the 'name' union exists
within the enclosing type BOOST_TTI_TP_T and the MPL lambda expression as specified
by BOOST_TTI_TP_U, invoked by passing the actual inner union of 'name', returns
a 'value' of true; otherwise 'value' is false.
The action taken with BOOST_TTI_TP_U occurs only when the 'name' union exists
within the enclosing type BOOST_TTI_TP_T.
</programlisting></para><para>Example usage:</para><para><programlisting language="c++">BOOST_TTI_TRAIT_HAS_UNION(LookFor,MyType) generates the metafunction LookFor in the current scope
to look for an inner union called MyType.
LookFor&lt;EnclosingType&gt;::value is true if MyType is an inner union of EnclosingType, otherwise false.
LookFor&lt;EnclosingType,ALambdaExpression&gt;::value is true if MyType is an inner union of EnclosingType
and invoking ALambdaExpression with the inner union returns a value of true, otherwise false.
A popular use of the optional MPL lambda expression is to check whether the union found is the same
as another type, when the union found is a typedef. In that case our example would be:
LookFor&lt;EnclosingType,boost::is_same&lt;_,SomeOtherType&gt; &gt;::value is true if MyType is an inner union
of EnclosingType and is the same type as SomeOtherType.
</programlisting> </para></description></macro>
<macro name="BOOST_TTI_HAS_UNION" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction which tests whether an inner union with a particular name exists. </purpose><description><para>BOOST_TTI_HAS_UNION is a macro which expands to a metafunction. The metafunction tests whether an inner union with a particular name exists and, optionally, whether an MPL lambda expression invoked with the inner union is true or not. The macro takes the form of BOOST_TTI_HAS_UNION(name) where</para><para>name = the name of the inner union.</para><para>BOOST_TTI_HAS_UNION generates a metafunction called "has_union_'name'" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_U&gt;
struct has_union_'name'
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = the enclosing type in which to look for our 'name'.
BOOST_TTI_TP_U = (optional) An optional template parameter, defaulting to a marker type.
If specified it is an MPL lambda expression which is invoked
with the inner union found and must return a constant boolean
value.
returns = 'value' depends on whether or not the optional BOOST_TTI_TP_U is specified.
If BOOST_TTI_TP_U is not specified, then 'value' is true if the 'name' union
exists within the enclosing type BOOST_TTI_TP_T; otherwise 'value' is false.
If BOOST_TTI_TP_U is specified, then 'value' is true if the 'name' union exists
within the enclosing type BOOST_TTI_TP_T and the MPL lambda expression as specified
by BOOST_TTI_TP_U, invoked by passing the actual inner union of 'name', returns
a 'value' of true; otherwise 'value' is false.
The action taken with BOOST_TTI_TP_U occurs only when the 'name' union exists
within the enclosing type BOOST_TTI_TP_T.
</programlisting></para><para>Example usage:</para><para><programlisting language="c++">BOOST_TTI_HAS_UNION(MyType) generates the metafunction has_union_MyType in the current scope
to look for an inner union called MyType.
has_union_MyType&lt;EnclosingType&gt;::value is true if MyType is an inner union of EnclosingType, otherwise false.
has_class_MyType&lt;EnclosingType,ALambdaExpression&gt;::value is true if MyType is an inner union of EnclosingType
and invoking ALambdaExpression with the inner union returns a value of true, otherwise false.
A popular use of the optional MPL lambda expression is to check whether the union found is the same
as another type, when the union found is a typedef. In that case our example would be:
has_union_MyType&lt;EnclosingType,boost::is_same&lt;_,SomeOtherType&gt; &gt;::value is true if MyType is an inner union
of EnclosingType and is the same type as SomeOtherType.
</programlisting> </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
<header name="boost/tti/member_type.hpp">
<namespace name="boost">
<namespace name="tti">
2021-10-05 21:37:46 +02:00
<struct name="valid_member_metafunction"><template>
<template-type-parameter name="BOOST_TTI_METAFUNCTION"/>
</template><inherit access="public">boost::mpl::not_&lt; boost::is_same&lt; BOOST_TTI_METAFUNCTION::type, BOOST_TTI_METAFUNCTION::boost_tti_marker_type &gt; &gt;</inherit><purpose>A metafunction which checks whether the invoked macro metafunction generated by BOOST_TTI_MEMBER_TYPE ( BOOST_TTI_TRAIT_MEMBER_TYPE ) hold a valid type. </purpose><description><para>The metafunction '<classname alt="boost::tti::valid_member_metafunction">valid_member_metafunction</classname>', which is in the boost::tti namespace, takes the form of:</para><para><programlisting language="c++">template&lt;class BOOST_TTI_METAFUNCTION&gt;
struct valid_member_metafunction
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_METAFUNCTION = The invoked macro metafunction generated by BOOST_TTI_MEMBER_TYPE ( BOOST_TTI_TRAIT_MEMBER_TYPE ).
returns = 'value' is true if the nested type of the invoked metafunction is valid, otherwise 'value' is false.
A valid type means that the invoked metafunction's inner 'type' is not the marker type.
</programlisting> </para></description></struct><struct name="valid_member_type"><template>
2018-01-12 21:47:58 +01:00
<template-type-parameter name="BOOST_TTI_TP_T"/>
<template-type-parameter name="BOOST_TTI_TP_MARKER_TYPE"><default>BOOST_TTI_NAMESPACE::detail::notype</default></template-type-parameter>
2021-10-05 21:37:46 +02:00
</template><inherit access="public">boost::mpl::not_&lt; boost::is_same&lt; BOOST_TTI_TP_T, BOOST_TTI_TP_MARKER_TYPE &gt; &gt;</inherit><purpose>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. </purpose><description><para>The metafunction '<classname alt="boost::tti::valid_member_type">valid_member_type</classname>', which is in the boost::tti namespace, takes the form of:</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_MARKER_TYPE = boost::tti::detail::notype&gt;
struct valid_member_type
{
static const value = unspecified;
typedef mpl::bool_&lt;true-or-false&gt; type;
};
The metafunction types and return:
BOOST_TTI_TP_T = returned inner 'type' from invoking the macro metafunction generated by BOOST_TTI_MEMBER_TYPE ( BOOST_TTI_TRAIT_MEMBER_TYPE ).
BOOST_TTI_TP_MARKER_TYPE = (optional) a type to use as the marker type.
defaults to the internal boost::tti::detail::notype.
returns = 'value' is true if the type is valid, otherwise 'value' is false.
A valid type means that the returned inner 'type' is not the marker type.
</programlisting> </para></description></struct></namespace>
2018-01-12 21:47:58 +01:00
</namespace>
2021-10-05 21:37:46 +02:00
<macro name="BOOST_TTI_TRAIT_MEMBER_TYPE" kind="functionlike"><macro-parameter name="trait"/><macro-parameter name="name"/><purpose>A macro expands to a metafunction whose typedef 'type' is either the named type or a marker type. </purpose><description><para>BOOST_TTI_TRAIT_MEMBER_TYPE is a macro which expands to a metafunction. The metafunction tests whether an inner type with a particular name exists by returning the inner type or a marker type. The macro takes the form of BOOST_TTI_TRAIT_MEMBER_TYPE(trait,name) where</para><para>trait = the name of the metafunction <sbr/>
name = the name of the inner type.</para><para>BOOST_TTI_TRAIT_MEMBER_TYPE generates a metafunction called "trait" where 'trait' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_MARKER_TYPE = boost::tti::detail::notype&gt;
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.
The enclosing type can be a class, struct, or union.
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,
which is empty, is used.
The metafunction also encapsulates the type of the marker type as
a nested 'boost_tti_marker_type'.
</programlisting></para><para>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. </para></description></macro>
<macro name="BOOST_TTI_MEMBER_TYPE" kind="functionlike"><macro-parameter name="name"/><purpose>A macro which expands to a metafunction whose typedef 'type' is either the named type or a marker type. </purpose><description><para>BOOST_TTI_MEMBER_TYPE is a macro which expands to a metafunction. The metafunction tests whether an inner type with a particular name exists by returning the inner type or a marker type. The macro takes the form of BOOST_TTI_MEMBER_TYPE(name) where</para><para>name = the name of the inner type.</para><para>BOOST_TTI_MEMBER_TYPE generates a metafunction called "member_type_name" where 'name' is the macro parameter.</para><para><programlisting language="c++">template&lt;class BOOST_TTI_TP_T,class BOOST_TTI_TP_MARKER_TYPE = boost::tti::detail::notype&gt;
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.
The enclosing type can be a class, struct, or union.
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'.
</programlisting></para><para>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. </para></description></macro>
2018-01-12 21:47:58 +01:00
</header>
</library-reference>