Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68448 - in sandbox/tti: boost/tti libs/tti/doc libs/tti/test
From: eldiener_at_[hidden]
Date: 2011-01-25 19:59:09


Author: eldiener
Date: 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
New Revision: 68448
URL: http://svn.boost.org/trac/boost/changeset/68448

Log:
Updated docs and combined has_type
Added:
   sandbox/tti/libs/tti/doc/TTIIndex.qbk (contents, props changed)
   sandbox/tti/libs/tti/doc/TTIUsingMM.qbk (contents, props changed)
   sandbox/tti/libs/tti/doc/TTIUsingNTM.qbk (contents, props changed)
Text files modified:
   sandbox/tti/boost/tti/TTIntrospection.hpp | 192 +++++++++++----------------------------
   sandbox/tti/libs/tti/doc/TTIDetail.qbk | 65 +++++++------
   sandbox/tti/libs/tti/doc/TTIFunctionality.qbk | 27 +++--
   sandbox/tti/libs/tti/doc/TTIHistory.qbk | 5 +
   sandbox/tti/libs/tti/doc/TTIMetafunctions.qbk | 124 +++++++++++++++----------
   sandbox/tti/libs/tti/doc/TTINestedType.qbk | 43 +++++---
   sandbox/tti/libs/tti/doc/TTITests.qbk | 2
   sandbox/tti/libs/tti/doc/TTIToDo.qbk | 2
   sandbox/tti/libs/tti/doc/TypeTraitsIntrospection.qbk | 3
   sandbox/tti/libs/tti/test/TestHasTypeCheckTypedef.cpp | 12 +-
   sandbox/tti/libs/tti/test/TestHasTypeCheckTypedef.hpp | 18 +-
   sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefCompile.cpp | 12 +-
   sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail.cpp | 2
   sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail2.cpp | 2
   sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail4.cpp | 2
   sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail5.cpp | 2
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.cpp | 30 +++---
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.hpp | 18 +-
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefCompile.cpp | 32 +++---
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail.cpp | 4
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail2.cpp | 4
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail3.cpp | 2
   22 files changed, 288 insertions(+), 315 deletions(-)

Modified: sandbox/tti/boost/tti/TTIntrospection.hpp
==============================================================================
--- sandbox/tti/boost/tti/TTIntrospection.hpp (original)
+++ sandbox/tti/boost/tti/TTIntrospection.hpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -32,39 +32,75 @@
 /** \file
 */
 
-/// Expands to a metafunction which tests whether an inner type with a particular name exists.
+/// Expands to a metafunction which tests whether an inner type with a particular name exists and optionally is a particular type.
 /**
 
     trait = the name of the metafunction within the tti namespace.<br />
     name = the name of the inner type.
 
- returns = a metafunction called "tti::trait" where 'trait' is the macro parameter.<br />
+ returns = a metafunction called "tti::trait" where 'trait' is the macro parameter.
     
               The metafunction types and return:
     
                 T = the enclosing type in which to look for our 'name'.<br />
- returns = 'value' is true if the 'name' type exists within the enclosing type,
+ U = the type of the inner type named 'name' as an optional parameter.<br />
+ returns = 'value' is true if the 'name' type exists within the enclosing type
+ and, if type U is specified, the 'name' type is the same as the type U,
                           otherwise 'value' is false.
-
+
 */
 #define TTI_TRAIT_HAS_TYPE(trait,name) \
 namespace tti \
   { \
   namespace detail \
     { \
- TTI_DETAIL_TRAIT_HAS_TYPE(trait,name) \
+ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, false) \
     } \
+ \
+ template<class T,class U,class B> \
+ struct BOOST_PP_CAT(trait,_impl) \
+ { \
+ typedef typename \
+ boost::mpl::eval_if \
+ < \
+ boost::is_same<typename T::name,U>, \
+ boost::mpl::true_, \
+ boost::mpl::false_ \
+ >::type \
+ type; \
+ }; \
+ \
+ template<class T,class U> \
+ struct BOOST_PP_CAT(trait,_impl)<T,U,boost::mpl::false_::type> \
+ { \
+ typedef boost::mpl::false_::type type; \
+ }; \
+ \
   template<class T> \
+ struct BOOST_PP_CAT(trait,_impl)<T,tti::detail::notype,boost::mpl::true_::type> \
+ { \
+ typedef boost::mpl::true_::type type; \
+ }; \
+ \
+ template<class T,class U = tti::detail::notype> \
   struct trait \
     { \
- typedef typename tti::detail::trait<T>::type type; \
+ \
+ typedef typename \
+ BOOST_PP_CAT(trait,_impl) \
+ < \
+ T, \
+ U, \
+ typename tti::detail::trait<T>::type \
+ >::type \
+ type; \
     \
     BOOST_STATIC_CONSTANT(bool,value=type::value); \
     }; \
   } \
 /**/
 
-/// Expands to a metafunction which tests whether an inner type with a particular name exists.
+/// Expands to a metafunction which tests whether an inner type with a particular name exists and optionally is a particular type.
 /**
 
     name = the name of the inner type.
@@ -72,10 +108,12 @@
     returns = a metafunction called "tti::has_type_name" where 'name' is the macro parameter.
     
               The metafunction types and return:
-
+
                 T = the enclosing type in which to look for our 'name'.<br />
- returns = 'value' is true if the 'name' type exists within the enclosing type,
- otherwise 'value' is false.
+ U = the type of the inner type named 'name' as an optional parameter.<br />
+ returns = 'value' is true if the 'name' type exists within the enclosing type
+ and, if type U is specified, the 'name' type is the same as the type U,
+ otherwise 'value' is false.
     
 */
 #define TTI_HAS_TYPE(name) \
@@ -164,92 +202,6 @@
   ) \
 /**/
   
-/// Expands to a metafunction which tests whether an inner type with a particular name exists and is a particular type.
-/**
-
- trait = the name of the metafunction within the tti namespace.<br />
- name = the name of the inner type.
-
- returns = a metafunction called "tti::trait" where 'trait' is the macro parameter.
-
- The metafunction types and return:
-
- T = the enclosing type in which to look for our 'name'.<br />
- U = the type of the inner type named 'name'.<br />
- returns = 'value' is true if the 'name' type exists within the enclosing type
- and the 'name' type is the same as the type U,
- otherwise 'value' is false.
-
-*/
-#define TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(trait,name) \
-namespace tti \
- { \
- namespace detail \
- { \
- BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, false) \
- } \
- \
- template<class T,class U,class B> \
- struct BOOST_PP_CAT(trait,_impl) \
- { \
- typedef typename \
- boost::mpl::eval_if \
- < \
- boost::is_same<typename T::name,U>, \
- boost::mpl::true_, \
- boost::mpl::false_ \
- >::type \
- type; \
- }; \
- \
- template<class T,class U> \
- struct BOOST_PP_CAT(trait,_impl)<T,U,boost::mpl::false_::type> \
- { \
- typedef boost::mpl::false_::type type; \
- }; \
- \
- template<class T,class U> \
- struct trait \
- { \
- \
- typedef typename \
- BOOST_PP_CAT(trait,_impl) \
- < \
- T, \
- U, \
- typename tti::detail::trait<T>::type \
- >::type \
- type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
- }; \
- } \
-/**/
-
-/// Expands to a metafunction which tests whether an inner type with a particular name exists and is a particular type.
-/**
-
- name = the name of the inner type.
-
- returns = a metafunction called "tti::has_type_check_typedef_name" where 'name' is the macro parameter.
-
- The metafunction types and return:
-
- T = the enclosing type in which to look for our 'name'.<br />
- U = the type of the inner type named 'name'.<br />
- returns = 'value' is true if the 'name' type exists within the enclosing type
- and the 'name' type is the same as the type U,
- otherwise 'value' is false.
-
-*/
-#define TTI_HAS_TYPE_CHECK_TYPEDEF(name) \
- TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF \
- ( \
- BOOST_PP_CAT(has_type_check_typedef_,name), \
- name \
- ) \
-/**/
-
 /// Expands to a metafunction which tests whether an inner class template with a particular name exists.
 /**
 
@@ -1008,7 +960,7 @@
 namespace tti
   {
   
-/// A metafunction which checks whether a type exists within an enclosing type.
+/// A metafunction which checks whether a type exists within an enclosing type and optionally is a particular type.
 /**
 
     This metafunction takes all its types as nullary metafunctions whose typedef 'type' member is the actual type used.
@@ -1017,22 +969,26 @@
 
       HasType = Template class generated from the TTI_HAS_TYPE ( or TTI_TRAIT_HAS_TYPE ) macro.<br />
       T = The enclosing type as a nullary metafunction.
+ U = the type of the inner type as a nullary metafunction, as an optional parameter.<br />
       
- returns = 'value' is true if the type exists within the enclosing type,
+ returns = 'value' is true if the type exists within the enclosing type
+ and, if type U is specified, the type is the same as the type U,
                 otherwise 'value' is false.
                           
 */
   template
     <
- template<class> class HasType,
- class T
+ template<class,class> class HasType,
+ class T,
+ class U = boost::mpl::identity<tti::detail::notype>
>
   struct mf_has_type :
     tti::detail::eval
       <
       HasType
         <
- T
+ T,
+ U
>
>
     {
@@ -1081,40 +1037,6 @@
     {
     };
     
-/// A metafunction which checks whether a type of a particular signature exists within an enclosing type.
-/**
-
- This metafunction takes all its types as nullary metafunctions whose typedef 'type' member is the actual type used.
-
- The metafunction types and return:
-
- HasTypeCheckTypedef = Template class generated from the TTI_HAS_TYPE_CHECK_TYPEDEF ( or TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF ) macro.<br />
- T = The enclosing type as a nullary metafunction.<br />
- U = The type of the enclosed type as a nullary metafunction.
-
- returns = 'value' is true if the type exists within the enclosing type,
- with the correct type signature,
- otherwise 'value' is false.
-
-*/
- template
- <
- template<class,class> class HasTypeCheckTypedef,
- class T,
- class U
- >
- struct mf_has_type_check_typedef :
- tti::detail::eval
- <
- HasTypeCheckTypedef
- <
- T,
- U
- >
- >
- {
- };
-
 /// A metafunction which checks whether a class template exists within an enclosing type.
 /**
 

Modified: sandbox/tti/libs/tti/doc/TTIDetail.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/TTIDetail.qbk (original)
+++ sandbox/tti/libs/tti/doc/TTIDetail.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -1,4 +1,4 @@
-[section:tti_detail Macros]
+[section:tti_detail Macro Metafunctions]
 
 The TTI library uses macros to create metafunctions, in the top-level 'tti' namespace,
 for introspecting an inner element by name. Each macro for a particular type of inner
@@ -15,7 +15,9 @@
 
 A table of these macros is given, with the inner element whose
 existence the metaprogrammer is introspecting. A more detailed explanation can be found
-in the reference section. In the Template column only the name generated by the simple form
+in the reference section, and examples of usage can be found in the
+[link sectti_usingMM "Using the Macro Metafunctions"] section.
+In the Template column only the name generated by the simple form
 of the template is given since the name generated by the complex form is always tti::trait
 where 'trait' is the first parameter to the corresponding complex form macro.
 
@@ -28,80 +30,83 @@
   [
     [Type]
     [
- [macroref TTI_HAS_TYPE TTI\_HAS\_TYPE](name)[br]
- [macroref TTI_TRAIT_HAS_TYPE TTI\_TRAIT\_HAS\_TYPE](trait,name)
+ [macroref TTI_HAS_TYPE TTI\_HAS\_TYPE](name)
     ]
     [
- tti::has\_type\_'name'[br]
+ tti::has\_type\_'name'
+
     class T = enclosing type
     ]
   ]
   [
     [Type with check]
     [
- [macroref TTI_HAS_TYPE_CHECK_TYPEDEF TTI\_HAS\_TYPE\_CHECK\_TYPEDEF](name)[br]
- [macroref TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF TTI\_TRAIT\_HAS\_TYPE\_CHECK\_TYPEDEF](trait,name)
+ [macroref TTI_HAS_TYPE TTI\_HAS\_TYPE](name)
     ]
     [
- tti::has\_type\_check\_typedef\_'name'[br]
+ tti::has\_type\_'name'
+
     class T = enclosing type,class U = type to check against
     ]
   ]
   [
     [Class Template]
     [
- [macroref TTI_HAS_TEMPLATE TTI\_HAS\_TEMPLATE](name)[br]
- [macroref TTI_TRAIT_HAS_TEMPLATE TTI\_TRAIT\_HAS\_TEMPLATE](trait,name)
+ [macroref TTI_HAS_TEMPLATE TTI\_HAS\_TEMPLATE](name)
     ]
     [
- tti::has\_template\_'name'[br]
- class T = enclosing type[br]
+ tti::has\_template\_'name'
+
+ class T = enclosing type
+
     All of the template parameters must be 'class' ( or 'typename' ) parameters
     ]
   ]
   [
     [Class Template with params]
     [
- [macroref TTI_HAS_TEMPLATE_CHECK_PARAMS TTI\_HAS\_TEMPLATE\_CHECK\_PARAMS](name,ppSeq[footnote A Boost PP data sequence with each comma separated portion of the template parameters as its own sequence element.])[br]
- [macroref TTI_TRAIT_HAS_TEMPLATE_CHECK_PARAMS TTI\_TRAIT\_HAS\_TEMPLATE\_CHECK\_PARAMS](trait,name,ppSeq)
+ [macroref TTI_HAS_TEMPLATE_CHECK_PARAMS TTI\_HAS\_TEMPLATE\_CHECK\_PARAMS](name,ppSeq[footnote A Boost PP data sequence with each comma separated portion of the template parameters as its own sequence element.])
     ]
     [
- tti::has\_template\_check\_params\_'name'[br]
+ tti::has\_template\_check\_params\_'name'
+
     class T = enclosing type
     ]
   ]
   [
     [Class Template with params using variadic macros[footnote Header file is TTIntrospectionVM.hpp.]]
     [
- [macroref TTI_VM_HAS_TEMPLATE_CHECK_PARAMS TTI\_VM\_HAS\_TEMPLATE\_CHECK\_PARAMS](name,...[footnote The template parameters as variadic data.])[br]
- [macroref TTI_VM_TRAIT_HAS_TEMPLATE_CHECK_PARAMS TTI\_VM\_TRAIT\_HAS\_TEMPLATE\_CHECK\_PARAMS](trait,name,...)
+ [macroref TTI_VM_HAS_TEMPLATE_CHECK_PARAMS TTI\_VM\_HAS\_TEMPLATE\_CHECK\_PARAMS](name,...[footnote The template parameters as variadic data.])
     ]
     [
- tti::has\_template\_check\_params\_'name'[br]
+ tti::has\_template\_check\_params\_'name'
+
     class T = enclosing type
     ]
   ]
   [
     [Data or function member]
     [
- [macroref TTI_HAS_MEMBER TTI\_HAS\_MEMBER](name)[br]
- [macroref TTI_TRAIT_HAS_MEMBER TTI\_TRAIT\_HAS\_MEMBER](trait,name)
+ [macroref TTI_HAS_MEMBER TTI\_HAS\_MEMBER](name)
     ]
     [
- tti::has\_member\_'name'[br]
- class T = pointer to data or function member[br]
- The form for T is 'Type Class::*' for member data[br]
+ tti::has\_member\_'name'
+
+ class T = pointer to data or function member
+
+ The form for T is 'Type Class::*' for member data
+
     The form for T is 'ReturnType (Class::*)(Zero or more comma-separated parameter types)' for member function
     ]
   ]
   [
     [Static data or static function member]
     [
- [macroref TTI_HAS_STATIC_MEMBER TTI\_HAS\_STATIC\_MEMBER](name)[br]
- [macroref TTI_TRAIT_HAS_STATIC_MEMBER TTI\_TRAIT\_HAS\_STATIC\_MEMBER](trait,name)
+ [macroref TTI_HAS_STATIC_MEMBER TTI\_HAS\_STATIC\_MEMBER](name)
     ]
     [
- tti::has\_static\_member\_'name'[br]
+ tti::has\_static\_member\_'name'
+
     class T = enclosing type,class Type = data or function type
     ]
   ]
@@ -121,18 +126,18 @@
   [
     [Type]
     [
- [macroref TTI_MEMBER_TYPE TTI\_MEMBER\_TYPE](name)[br]
- [macroref TTI_TRAIT_MEMBER_TYPE TTI\_TRAIT\_MEMBER\_TYPE](trait,name)
+ [macroref TTI_MEMBER_TYPE TTI\_MEMBER\_TYPE](name)
     ]
     [
- tti::member\_type\_'name'[br]
+ tti::member\_type\_'name'
+
     class T = enclosing type
     ]
   ]
 ]
 
 The usefulness of this macro, and its corresponding metafunction, will be shown
-in the next section when I explain the problem of nested types and how TTI solves
+in the next topic when I explain the problem of nested types and how TTI solves
 it.
 
 [endsect]

Modified: sandbox/tti/libs/tti/doc/TTIFunctionality.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/TTIFunctionality.qbk (original)
+++ sandbox/tti/libs/tti/doc/TTIFunctionality.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -15,7 +15,7 @@
 These are the compile-time questions which the TTI library answers.
 
 All of the questions above attempt to find an answer about an inner element with
-a particular name. In order to do this using template metaprogramming, macros are used
+a particular name. In order to do this using template metaprogramming macros are used
 so that the name of the inner element can be passed to the macro. The macro will then
 generate an appropriate metafunction, which the template metaprogrammer can then use to
 introspect the information that is needed. The name itself of the inner element is always passed
@@ -34,19 +34,22 @@
   TTI\_TRAIT\_ and a 'trait' name is passed as the first parameter, with the 'name' of the inner
   element as the second parameter. The 'trait' name serves only to completely name the metafunction in
   the tti namespace. As an example, for the macro TTI_TRAIT_HAS_TYPE(MyTrait,MyType) the name of
- the metafunction is 'tti::MyTrait' and it will look for an inner type called 'MyType'.
+ the metafunction is 'tti::MyTrait' and it will look for an inner type called 'MyType'. Every
+ macro has a corresponding complex form.
   
-[important When introspecting a particular inner element any given macro metafunction generated can be reused
-with any combination of template parameters which involve the same type of inner element. Furthermore once a macro
-metafunction is generated, attempting to generate another macro metafunction of the same name will create ODR
-violations since two C++ constructs with the same name/type in the same namespace will have been created. This
-latter possibility has much less chance of occurence if you use the simple form of each macro and just reuse
-the macro metafunction. You can even do this if you are introspecting for two entities of the same name in
-different enclosing types, or in the same enclosing type but with different signatures,
-as with overloaded member functions.]
+[important When introspecting a particular inner element any given macro metafunction generated
+can be reused with any combination of template parameters which involve the same type of inner element.
+Furthermore once a macro metafunction is generated, attempting to generate another macro metafunction of the
+same name will create ODR violations since two C++ constructs with the same name/type in the same namespace
+will have been created. This latter possibility has much less chance of occurence if you use the simple form
+of each macro and just reuse the macro metafunction. You can even do this if you are introspecting for two
+entities of the same name in different enclosing types, or in the same enclosing type but with different
+signatures, as with overloaded member functions.]
   
 Once either of these two macro forms are used for a particular type of inner element, the
-corresponding macro metafunction has the exact same functionality. I refer to these two macros as
-a macro pair, and they are denoted in the documentation as 'SIMPLE_FORM ( COMPLEX_FORM )'.
+corresponding macro metafunction has the exact same functionality.
+
+In the succeeding documentation all macro metafunctions will be referred by their simple form
+name, but remember that the complex form name can always alternatively be used.
   
 [endsect]

Modified: sandbox/tti/libs/tti/doc/TTIHistory.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/TTIHistory.qbk (original)
+++ sandbox/tti/libs/tti/doc/TTIHistory.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -1,5 +1,10 @@
 [section:tti_history History]
 
+Version 1.1
+
+* Library now compiles with gcc 3.4.2 and gcc 3.4.5.
+* Examples of use have been added to the documentation.
+
 Version 1.0
 
 Initial version of the libary.

Added: sandbox/tti/libs/tti/doc/TTIIndex.qbk
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/doc/TTIIndex.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -0,0 +1,2 @@
+'''<index/>'''
+

Modified: sandbox/tti/libs/tti/doc/TTIMetafunctions.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/TTIMetafunctions.qbk (original)
+++ sandbox/tti/libs/tti/doc/TTIMetafunctions.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -1,18 +1,18 @@
-[section:tti_metafunctions Metafunctions]
+[section:tti_metafunctions Nested Type Metafunctions]
 
-The nested type metafunctions parallel the macro metafunctions but allow
+The nested type metafunctions parallel the macro metafunctions but more easily allow
 nested types to be used without compiler errors and without needing to use the
 T::InnerType notation for nested types.
 
 For each of these metafunctions the first parameter is the class template of its corresponding macro metafunction
-and the remaining parameter are 'types', which always consists first of the enclosing type and then
+and the remaining parameter are 'types'. These 'types' always consist first of the enclosing type and then
 possibly other types which make up the signature of whatever inner element we are introspecting. Each of these
 'types' is passed as a nullary metafunction whose typedef 'type' is the actual type.
 
 For a type which is in scope, we can always use
 boost::mpl::identity to create our nullary metafunction, and there can never be a compiler error for
 such known types as long as such declarations for them exist. For nested types, which may or may not
-exist, we can pass the result of the macro pair TTI\_MEMBER\_TYPE ( TTI\_TRAIT\_MEMBER\_TYPE ) or its equivalent
+exist, we can pass the result of TTI\_MEMBER\_TYPE or its equivalent
 nested type metafunction tti::mf\_member\_type ( explained later ).
 
 To use these metafunctions you need to include the main header file 'TTIntrospection.hpp',
@@ -24,9 +24,11 @@
 
 A table of these metafunctions is given, based on the inner element whose
 existence the metaprogrammer is introspecting. A more detailed explanation can be found
-in the reference section. All of the metafunctions are in the top-level 'tti' namespace,
+in the reference section, and examples of usage can be found in the
+[link sectti_usingNTM "Using the Nested Type Metafunctions"] section.
+All of the metafunctions are in the top-level 'tti' namespace,
 all have a particular name based on the type of its functionality, and all begin with the prefix
-'mf_' so as not to conflict with the macro metafunction named generated by the library.
+'mf_' so as not to conflict with the macro metafunction names generated by the library.
 
 [table:tbmetafunctions TTI Metafunctions
   [
@@ -41,24 +43,29 @@
     [classref tti::mf_has_type]
     ]
     [
- template<class> class HasType[br]
- = generated macro metafunction[br]
+ template<class,class = unspecified type> class HasType
+
+ = generated macro metafunction
+
     class T = enclosing type nullary metafunction
     ]
- [TTI\_HAS\_TYPE (TTI\_TRAIT\_HAS\_TYPE)]
+ [TTI\_HAS\_TYPE]
   ]
   [
     [Type with check]
     [
- [classref tti::mf_has_type_check_typedef]
+ [classref tti::mf_has_type]
     ]
     [
- template<class,class> class HasTypeCheckTypedef[br]
- = generated macro metafunction[br]
- class T = enclosing type nullary metafunction[br]
+ template<class,class = unspecified type> class HasType
+
+ = generated macro metafunction
+
+ class T = enclosing type nullary metafunction
+
     class U = type to check against nullary metafunction
     ]
- [TTI\_HAS\_TYPE\_CHECK\_TYPEDEF (TTI\_TRAIT\_HAS\_TYPE\_CHECK\_TYPEDEF)]
+ [TTI\_HAS\_TYPE]
   ]
   [
     [Class Template]
@@ -66,13 +73,13 @@
     [classref tti::mf_has_template]
     ]
     [
- template<class> class HasTemplate[br]
- = generated macro metafunction[br]
+ template<class> class HasTemplate
+
+ = generated macro metafunction
+
     class T = enclosing type nullary metafunction
     ]
- [
- TTI\_HAS\_TEMPLATE (TTI\_TRAIT\_HAS\_TEMPLATE)
- ]
+ [TTI\_HAS\_TEMPLATE]
   ]
   [
     [Class Template with params]
@@ -80,13 +87,16 @@
     [classref tti::mf_has_template_check_params]
     ]
     [
- template<class> class HasTemplateCheckParams[br]
- = generated macro metafunction[br]
+ template<class> class HasTemplateCheckParams
+
+ = generated macro metafunction
+
     class T = enclosing type nullary metafunction
     ]
     [
- TTI\_HAS\_TEMPLATE\_CHECK\_PARAMS (TTI\_TRAIT\_HAS\_TEMPLATE\_CHECK\_PARAMS)[br]
- TTI\_VM\_HAS\_TEMPLATE\_CHECK\_PARAMS (TTI\_VM\_TRAIT\_HAS\_TEMPLATE\_CHECK\_PARAMS)
+ TTI\_HAS\_TEMPLATE\_CHECK\_PARAMS
+
+ TTI\_VM\_HAS\_TEMPLATE\_CHECK\_PARAMS
     ]
   ]
   [
@@ -95,12 +105,15 @@
     [classref tti::mf_has_member_data]
     ]
     [
- template<class> class HasMember[br]
- = generated macro metafunction[br]
- class T = enclosing type nullary metafunction[br]
+ template<class> class HasMember
+
+ = generated macro metafunction
+
+ class T = enclosing type nullary metafunction
+
     class R = type of member data nullary Metafunction
     ]
- [TTI\_HAS\_MEMBER (TTI\_TRAIT\_HAS\_MEMBER)]
+ [TTI\_HAS\_MEMBER]
   ]
   [
     [Member function]
@@ -108,13 +121,17 @@
     [classref tti::mf_has_member_function]
     ]
     [
- template<class> class HasMember[br]
- = generated macro metafunction[br]
- class T = enclosing type nullary metafunction[br]
- class R = return value nullary metafunction[br]
+ template<class> class HasMember
+
+ = generated macro metafunction
+
+ class T = enclosing type nullary metafunction
+
+ class R = return value nullary metafunction
+
     class Types... = parameter types as nullary metafunctions
     ]
- [TTI\_HAS\_MEMBER (TTI\_TRAIT\_HAS\_MEMBER)]
+ [TTI\_HAS\_MEMBER]
   ]
   [
     [Static data]
@@ -122,12 +139,15 @@
     [classref tti::mf_has_static_data]
     ]
     [
- template<class,class> class HasStaticMember[br]
- = generated macro metafunction[br]
- class T = enclosing type nullary metafunction[br]
+ template<class,class> class HasStaticMember
+
+ = generated macro metafunction
+
+ class T = enclosing type nullary metafunction
+
     class R = type of static data nullary metafunction
     ]
- [TTI\_HAS\_STATIC\_MEMBER (TTI\_TRAIT\_HAS\_STATIC\_MEMBER)]
+ [TTI\_HAS\_STATIC\_MEMBER]
   ]
   [
     [Static function]
@@ -135,13 +155,17 @@
     [classref tti::mf_has_static_function]
     ]
     [
- template<class,class> class HasStaticMember[br]
- = generated macro metafunction[br]
- class T = enclosing type nullary metafunction[br]
- class R = return value nullary metafunction[br]
+ template<class,class> class HasStaticMember
+
+ = generated macro metafunction
+
+ class T = enclosing type nullary metafunction
+
+ class R = return value nullary metafunction
+
     class Types... = parameter types as nullary metafunctions
     ]
- [TTI\_HAS\_STATIC\_MEMBER (TTI\_TRAIT\_HAS\_STATIC\_MEMBER)]
+ [TTI\_HAS\_STATIC\_MEMBER]
   ]
 ]
 
@@ -155,7 +179,7 @@
 
 [heading Nested type metafunction member_type equivalent]
 
-Just as there is the macro pair TTI\_MEMBER\_TYPE (TTI\_TRAIT\_MEMBER\_TYPE) for creating
+Just as there is the macro TTI\_MEMBER\_TYPE for creating
 a macro metafunction which returns a nested type if it exists, else an unspecified
 type, there is also the equivalent metafunction.
 
@@ -172,17 +196,19 @@
     [classref tti::mf_member_type]
     ]
     [
- template<class> class MemberType[br]
- = generated macro metafunction[br]
+ template<class> class MemberType
+
+ = generated macro metafunction
+
     class T = enclosing type nullary metafunction
     ]
- [TTI\_MEMBER\_TYPE (TTI\_TRAIT\_MEMBER\_TYPE)]
+ [TTI\_MEMBER\_TYPE]
   ]
 ]
 
 The use of this metafunction allows us to created deeply nested types,
 which may or may not exist, as nullary metafunctions in much the same way
-that TTI\_MEMBER\_TYPE (TTI\_TRAIT\_MEMBER\_TYPE) can. The difference is
+that TTI\_MEMBER\_TYPE can. The difference is
 the simpler syntax when using mf\_member\_type.
 
 As an example, given the theoretical relationship of types we used before:
@@ -234,10 +260,12 @@
 The nested type created can be used with the other nested type metafunctions above.
 The key information above is that the enclosing type is a nullary metafunction,
 which means that the enclosing type can be specified as the result
-of using TTI\_MEMBER\_TYPE (TTI\_TRAIT\_MEMBER\_TYPE) as well as the
+of using TTI\_MEMBER\_TYPE as well as the
 result of using mf\_member\_type itself. Both techniques are shown in the example
 above, and the same technique for creating nested types as nullary metafunctions
 can be used with the other functionality of the nested type metafunctions when
-nested types are used.
+nested types are needed as 'types'.
+
+In our next section we will look at examples of nested type metafunction use.
 
 [endsect]

Modified: sandbox/tti/libs/tti/doc/TTINestedType.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/TTINestedType.qbk (original)
+++ sandbox/tti/libs/tti/doc/TTINestedType.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -46,21 +46,20 @@
 nested types without producing a compiler error if the nested type does not exist, but still
 are able to do the introspecting for inner elements that our TTI macro metafunctions do.
 
-We have already seen one of those constructs, the macro TTI\_MEMBER\_TYPE
-( TTI\_TRAIT\_MEMBER\_TYPE ), which generates a metafunction based on the name
+We have already seen one of those constructs, the macro TTI\_MEMBER\_TYPE,
+which generates a metafunction based on the name
 of an inner type. But instead of telling us whether that inner type exists it instead returns
 a typedef 'type' which is that inner type if it exists, else it is an unspecified type if it
 does not. In this way we have created a metafunction, very similar in functionality to
 boost::mpl::identity, but which still returns some unspecified marker 'type' if our nested type is invalid.
 
-We can use the functionality of TTI\_MEMBER\_TYPE ( TTI\_TRAIT\_MEMBER\_TYPE ) to construct nested types
+We can use the functionality of TTI\_MEMBER\_TYPE to construct nested types
 for our other macro metafunctions, without having to use the T::InnerType syntax and produce a compiler
 error if no such type actually exists within our scope. We can even do this in deeply nested contexts
 by stringing together, so to speak, a series of these macro metafunction results.
 
 As an example, given a type T, let us create a metafunction where there is a nested type FindType
-whose enclosing type is CType, where CType's enclosing type is BType, where BType's enclosing type
-is AType, and where AType's enclosing type is our original T. We can represent this conventially as:
+whose enclosing type is eventually T, as represented by the following structure:
 
  struct T
    {
@@ -78,7 +77,7 @@
      };
    };
 
-We can represent this by first creating a series of member type macros for each of our nested
+In our TTI code we first create a series of member type macros for each of our nested
 types:
 
  TTI_MEMBER_TYPE(FindType)
@@ -104,7 +103,7 @@
>::type
> MyFindType;
   
-We can use the above typedef to pass the type of FindType
+We can use the above typedef to pass the type as FindType
 to one of our macro metafunctions. FindType may not actually exist but we will not generate
 a compiler error when we use it.
 
@@ -124,8 +123,8 @@
 FindType has a static member data called MyData of type 'int', even if FindType does not actually
 exist as we have specified it as a type.
 
-We can also find out whether the deeply nested type 'FindType' actually exists in a similar manner.
-Our metafunction would be:
+As an alternative we can also directly find out whether the deeply nested type 'FindType'
+actually exists in a similar manner. Our metafunction would be:
 
  TTI_HAS_TYPE(FindType)
 
@@ -146,20 +145,30 @@
>::type
>
   
-Because this duplicates much of our code to create our nested type as a metafunction,
+Because this duplicates much of our code using 'MyFindType' to create our nested type as a metafunction,
 TTI\_MEMBER\_TYPE also has, as a convenience, a boolean compile-time constant value
 called 'valid' which returns 'true' if our nested type exists or 'false' if it does not.
+Using this functionality of TTI\_MEMBER\_TYPE with our 'MyFindType' metafunction above
+we could create the nullary metafunction:
+
+ boost::mpl::bool_
+ <
+ MyFindType::valid
+ >
+
+directly instead of replicating the same functionality with our 'tti::has_type_FindType' metafunction.
 
 [heading A more elegant solution]
 
 Although using TTI\_MEMBER\_TYPE represents a good solution to creating a nested type
 without the possible compile-time error of the T::InnerType syntax, reaching in to
-specify all those ::type expressions does get syntactically tedious. Because of this
-the TTI library offers a parallel set of metafunctions to the macro metafunctions
-where the 'types' used are themselves nullary metafunctions. Furthermore, composite
-types are broken down into a notation of individual types so that nested types can be
-more easily passed to these metafunctions in the formation of data and function signatures.
-This parallel set of metafunctions, using nullary metafunctions to specify individual types,
-are called 'nested type metafunctions' and are fully explained in the next section.
+specify all those ::type expressions, along with their repeated 'typename',
+does get syntactically tedious. Because of this the TTI library offers a parallel set of
+metafunctions to the macro metafunctions where the 'types' used are themselves nullary
+metafunctions. Furthermore, composite types are broken down into a notation of individual
+types so that nested types can be more easily passed to these metafunctions in the formation
+of data and function signatures. This parallel set of metafunctions, using nullary
+metafunctions to specify individual types, are called 'nested type metafunctions' and are
+fully explained later after we give some examples of macro metafunction use.
 
 [endsect]

Modified: sandbox/tti/libs/tti/doc/TTITests.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/TTITests.qbk (original)
+++ sandbox/tti/libs/tti/doc/TTITests.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -15,6 +15,6 @@
 of TTI, specify the target as 'ttiVM'.
 
 The TTI library has been tested with VC++ 8, 9, 10 and with
-gcc 4.3.0, 4.4.0, and 4.5.0-1.
+gcc 3.4.2, 3.4.5, 4.3.0, 4.4.0, 4.5.0-1, and 4.5.2-1.
 
 [endsect]

Modified: sandbox/tti/libs/tti/doc/TTIToDo.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/TTIToDo.qbk (original)
+++ sandbox/tti/libs/tti/doc/TTIToDo.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -3,7 +3,5 @@
 * Use FunctionTypes tag type for the function nested metafunctions.
 * Create metafunctions that work with mpl lambda expressions.
 * See if function templates can be introspected.
-* Put some examples in the documentation.
-* Find a workarounnd so that gcc3+ can compile TTI correctly.
 
 [endsect]

Added: sandbox/tti/libs/tti/doc/TTIUsingMM.qbk
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/doc/TTIUsingMM.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -0,0 +1,205 @@
+[section:tti_usingMM Using the Macro Metafunctions]
+[#sectti_usingMM]
+
+Using the macro metafunctions can be illustrated by first creating some hypothetical
+user-defined type with corresponding nested types and other inner elements.
+With this type we can illustrate the use of the macro metafunctions. This is
+just meant to serve as a model for what a type T might entail from within
+a class or function template.
+
+ // An enclosing type
+
+ struct AType
+ {
+
+ // Type
+
+ typedef int AnIntType; // as a typedef
+
+ struct BType // as a nested type
+ {
+ struct CType
+ {
+ };
+ };
+
+ // Template
+
+ template <class> struct AMemberTemplate { };
+ template <class,class,int,class,template <class> class InnerTemplate,class,long> struct ManyParameters { };
+ template <class,class,int,short,class,template <class,int> class InnerTemplate,class> struct MoreParameters { };
+
+ // Data
+
+ BType IntBT;
+
+ // Function
+
+ int IntFunction(short) { return 0; }
+
+ // Static Data
+
+ static short DSMember;
+
+ // Static Function
+
+ static int SIntFunction(long,double) { return 2; }
+
+ };
+
+I will be using the type above just to illustrate the sort of
+metaprogramming questions we can ask of some type T which is passed
+to the template programmer in a class template. Here is what the
+class template might look like:
+
+ #include <boost/TTIntrospection.hpp>
+
+ template<class T>
+ struct OurTemplateClass
+ {
+
+ // compile-time template code regarding T
+
+ };
+
+Now let us create and invoke the macro metafunctions for each of our inner element types,
+to see if type T above corresponds to our hypothetical type above. Imagine this being
+within 'OurTemplateClass' above. In the examples below the same macro is invoked just once
+to avoid ODR violations.
+
+[heading Type]
+
+Does T have a nested type called 'AnIntType' ?
+
+ TTI_HAS_TYPE(AnIntType)
+
+ tti::has_type_AnIntType
+ <
+ T
+ >
+
+Does T have a nested type called 'BType' ?
+
+ TTI_HAS_TYPE(BType)
+
+ tti::has_type_BType
+ <
+ T
+ >
+
+[heading Type checking the typedef]
+
+Does T have a nested typedef called 'AnIntType' whose type is an 'int' ?
+
+ tti::has_type_AnIntType
+ <
+ T,
+ int
+ >
+
+[heading Template]
+
+Does T have a nested class template called 'AMemberTemplate' whose template
+parameters are all types ('class' or 'typename') ?
+
+ TTI_HAS_TEMPLATE(AMemberTemplate)
+
+ tti::has_template_AMemberTemplate
+ <
+ T
+ >
+
+[heading Template with params]
+
+Does T have a nested class template called 'MoreParameters' whose template
+parameters are specified exactly ?
+
+ TTI_HAS_TEMPLATE_CHECK_PARAMS(MoreParameters,(class)(class)(int)(short)(class)(template <class)(int> class InnerTemplate)(class))
+
+ tti::has_template_check_params_MoreParameters
+ <
+ T
+ >
+
+[heading Template with params using variadic macros]
+
+[note Include the 'TTIntrospectionVM.hpp' header file
+when using this macro.]
+
+Does T have a nested class template called 'ManyParameters' whose template
+parameters are specified exactly ?
+
+ TTI_VM_HAS_TEMPLATE_CHECK_PARAMS(ManyParameters,class,class,int,class,template <class> class InnerTemplate,class,long)
+
+ tti::has_template_check_params_ManyParameters
+ <
+ T
+ >
+
+[heading Member data]
+
+Does T have a member data called 'IntBT' whose type is 'AType::BType' ?
+
+ TTI_HAS_MEMBER(IntBT)
+
+ tti::has_member_IntBT
+ <
+ AType::BType T::*
+ >
+
+[heading Member function]
+
+Does T have a member function called 'IntFunction' whose type is
+'int (short)' ?
+
+ TTI_HAS_MEMBER(IntFunction)
+
+ tti::has_member_IntFunction
+ <
+ int (T::*)(short)
+ >
+
+[heading Static member data]
+
+Does T have a static member data called 'DSMember' whose type is 'short' ?
+
+ TTI_HAS_STATIC_MEMBER(DSMember)
+
+ tti::has_static_member_DSMember
+ <
+ T,
+ short
+ >
+
+[heading Static member function]
+
+Does T have a static member function called 'SIntFunction' whose type
+is 'int (long,double)' ?
+
+ TTI_HAS_STATIC_MEMBER(SIntFunction)
+
+ tti::has_static_member_SIntFunction
+ <
+ T,
+ int (long,double)
+ >
+
+[heading Member type]
+
+Create a nested type T::BType::CType without creating a compiler error
+if T does not have the nested type BType::CType ?
+
+ TTI_MEMBER_TYPE(BType)
+ TTI_MEMBER_TYPE(CType)
+
+ typename
+ tti::member_type_CType
+ <
+ typename
+ tti::member_type_BType
+ <
+ T
+ >::type
+ >::type
+
+[endsect]

Added: sandbox/tti/libs/tti/doc/TTIUsingNTM.qbk
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/doc/TTIUsingNTM.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -0,0 +1,260 @@
+[section:tti_usingNTM Using the Nested Type Metafunctions]
+[#sectti_usingNTM]
+
+Using the nested type metafunctions can be illustrated by first creating some hypothetical
+user-defined type with corresponding nested types and other inner elements.
+This user-defined type will be weighted toward showing deeply nested types and elements within
+those nested types. With this type we can illustrate the use of the nested type metafunctions. This is
+just meant to serve as a model for what a type T might entail from within
+a class or function template.
+
+ // An enclosing type
+
+ struct T
+ {
+
+ // Type
+
+ struct BType // as a nested type
+ {
+
+ // Template
+
+ template <class,class,int,class,template <class> class InnerTemplate,class,long> struct ManyParameters { };
+
+ // Type
+
+ struct CType // as a further nested type
+ {
+
+ // Template
+
+ template <class> struct AMemberTemplate { };
+
+ // Type
+
+ struct DType // as a futher nested type
+ {
+
+ // Type
+
+ typedef double ADoubleType;
+
+ // Template
+
+ template <class,class,int,short,class,template <class,int> class InnerTemplate,class> struct MoreParameters { };
+
+ // Function
+
+ int IntFunction(short) { return 0; }
+
+ // Static Data
+
+ static short DSMember;
+
+ // Static Function
+
+ static int SIntFunction(long,double) { return 2; }
+
+ };
+ };
+ };
+
+ // Data
+
+ BType IntBT;
+
+ };
+
+I will be using the type above just to illustrate the sort of
+metaprogramming questions we can ask of some type T which is passed
+to the template programmer in a class template. Here is what the
+class template might look like:
+
+ #include <boost/TTIntrospection.hpp>
+
+ template<class T>
+ struct OurTemplateClass
+ {
+
+ // compile-time template code regarding T
+
+ };
+
+Now let us create and invoke the nested metafunctions for each of our inner element types,
+to see if type T above corresponds to our hypothetical type above. Imagine this being
+within 'OurTemplateClass' above. In the examples below the same macro is invoked just once
+to avoid ODR violations.
+
+[heading Member type]
+
+We start off by creating typedef's for our theoretical inner types
+in relation to T as nullary metafunctions. None of these typedefs
+will produce a compiler error even if our structure does not correspond
+to T's reality. This also illustrates using 'tti::mf_member_type'.
+
+ TTI_MEMBER_TYPE(BType)
+ TTI_MEMBER_TYPE(CType)
+ TTI_MEMBER_TYPE(DType)
+
+ typedef
+ tti::mf_member_type
+ <
+ tti::member_type_BType,
+ boost::mpl::identity<T>
+ >
+ BTypeNM;
+
+ typedef
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ BTypeNM
+ >
+ CTypeNM;
+
+ typedef
+ tti::mf_member_type
+ <
+ tti::member_type_DType,
+ CTypeNM
+ >
+ DTypeNM;
+
+We will use these typedefs in the ensuing examples.
+
+[heading Type]
+
+Does T have a nested type called 'DType' within 'BType::CType' ?
+
+ TTI_HAS_TYPE(DType)
+
+ tti::mf_has_type
+ <
+ tti::has_type_DType,
+ CTypeNM
+ >
+
+We could just have easily used the boolean constant 'valid' of our
+DTypeNM typedef to the same effect:
+
+ boost::mpl::bool_
+ <
+ DTypeNM::valid
+ >
+
+[heading Type checking the typedef]
+
+Does T have a nested typedef called 'ADoubleType'
+within 'BType::CType::DType' whose type is a 'double' ?
+
+ TTI_HAS_TYPE(ADoubleType)
+
+ tti::mf_has_type
+ <
+ tti::has_type_ADoubleType,
+ DTypeNM,
+ boost::mpl::identity<double>
+ >
+
+[heading Template]
+
+Does T have a nested class template called 'AMemberTemplate'
+within 'BType::CType' whose template parameters are all types ('class' or 'typename') ?
+
+ TTI_HAS_TEMPLATE(AMemberTemplate)
+
+ tti::mf_has_template
+ <
+ tti::has_template_AMemberTemplate,
+ CTypeNM
+ >
+
+[heading Template with params]
+
+Does T have a nested class template called 'ManyParameters'
+within 'BType' whose template parameters are specified exactly ?
+
+ TTI_HAS_TEMPLATE_CHECK_PARAMS(ManyParameters,(class)(class)(int)(class)(template <class> class InnerTemplate)(class)(long))
+
+ tti::mf_has_template_check_params
+ <
+ tti::has_template_check_params_ManyParameters,
+ BTypeNM
+ >
+
+[heading Template with params using variadic macros]
+
+[note Include the 'TTIntrospectionVM.hpp' header file
+when using this macro.]
+
+Does T have a nested class template called 'MoreParameters'
+within 'BType::CType' whose template parameters are specified exactly ?
+
+ TTI_VM_HAS_TEMPLATE_CHECK_PARAMS(MoreParameters,class,class,int,short,class,template <class,int> class InnerTemplate,class)
+
+ tti::mf_has_template_check_params
+ <
+ tti::has_template_check_params_MoreParameters,
+ CTypeNM
+ >
+
+[heading Member data]
+
+Does T have a member data called 'IntBT' whose type is 'BType' ?
+
+ TTI_HAS_MEMBER(IntBT)
+
+ tti::mf_has_member_data
+ <
+ tti::has_member_IntBT,
+ boost::mpl::identity<T>,
+ BTypeNM
+ >
+
+[heading Member function]
+
+Does T have a member function called 'IntFunction'
+within 'BType::CType::DType' whose type is 'int (short)' ?
+
+ TTI_HAS_MEMBER(IntFunction)
+
+ tti::mf_has_member_function
+ <
+ tti::has_member_IntFunction,
+ DTypeNM,
+ boost::mpl::identity<int>,
+ boost::mpl::identity<short>
+ >
+
+[heading Static member data]
+
+Does T have a static member data called 'DSMember'
+within 'BType::CType::DType' whose type is 'short' ?
+
+ TTI_HAS_STATIC_MEMBER(DSMember)
+
+ tti::mf_has_static_data
+ <
+ tti::has_static_member_DSMember,
+ DTypeNM,
+ boost::mpl::identity<short>
+ >
+
+[heading Static member function]
+
+Does T have a static member function called 'SIntFunction'
+within 'BType::CType::DType' whose type is 'int (long,double)' ?
+
+ TTI_HAS_STATIC_MEMBER(SIntFunction)
+
+ tti::mf_has_static_function
+ <
+ tti::has_static_member_SIntFunction,
+ DTypeNM,
+ boost::mpl::identity<int>,
+ boost::mpl::identity<long>,
+ boost::mpl::identity<double>
+ >
+
+[endsect]

Modified: sandbox/tti/libs/tti/doc/TypeTraitsIntrospection.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/TypeTraitsIntrospection.qbk (original)
+++ sandbox/tti/libs/tti/doc/TypeTraitsIntrospection.qbk 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -16,9 +16,12 @@
 [include TTIFunctionality.qbk]
 [include TTIDetail.qbk]
 [include TTINestedType.qbk]
+[include TTIUsingMM.qbk]
 [include TTIMetafunctions.qbk]
+[include TTIUsingNTM.qbk]
 [include TTIReference.qbk]
 [include TTITests.qbk]
 [include TTIHistory.qbk]
 [include TTIToDo.qbk]
 [include TTIAcknowledgements.qbk]
+[include TTIIndex.qbk]

Modified: sandbox/tti/libs/tti/test/TestHasTypeCheckTypedef.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasTypeCheckTypedef.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasTypeCheckTypedef.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -4,15 +4,15 @@
 int main()
   {
   
- BOOST_TEST((tti::has_type_check_typedef_AnIntType<AType,int>::value));
+ BOOST_TEST((tti::has_type_AnIntType<AType,int>::value));
   BOOST_TEST((tti::NameStruct<AType,AType::AStructType>::value));
- BOOST_TEST((tti::has_type_check_typedef_AnIntTypeReference<AType,int &>::value));
- BOOST_TEST((tti::has_type_check_typedef_BType<AType,AType::BType>::value));
+ BOOST_TEST((tti::has_type_AnIntTypeReference<AType,int &>::value));
+ BOOST_TEST((tti::has_type_BType<AType,AType::BType>::value));
   BOOST_TEST((tti::TheInteger<AType::BType,int>::value));
- BOOST_TEST((tti::has_type_check_typedef_CType<AType::BType,AType::BType::CType>::value));
- BOOST_TEST((tti::has_type_check_typedef_AnotherIntegerType<AType::BType::CType,int>::value));
+ BOOST_TEST((tti::has_type_CType<AType::BType,AType::BType::CType>::value));
+ BOOST_TEST((tti::has_type_AnotherIntegerType<AType::BType::CType,int>::value));
   BOOST_TEST((tti::SomethingElse<AnotherType,AType::AnIntType>::value));
- BOOST_TEST((!tti::has_type_check_typedef_NoOtherType<AnotherType,double>::value));
+ BOOST_TEST((!tti::has_type_NoOtherType<AnotherType,double>::value));
   
   return boost::report_errors();
 

Modified: sandbox/tti/libs/tti/test/TestHasTypeCheckTypedef.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasTypeCheckTypedef.hpp (original)
+++ sandbox/tti/libs/tti/test/TestHasTypeCheckTypedef.hpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -4,14 +4,14 @@
 #include "TestStructs.hpp"
 #include <boost/tti/TTIntrospection.hpp>
 
-TTI_HAS_TYPE_CHECK_TYPEDEF(AnIntType)
-TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(NameStruct,AStructType)
-TTI_HAS_TYPE_CHECK_TYPEDEF(AnIntTypeReference)
-TTI_HAS_TYPE_CHECK_TYPEDEF(BType)
-TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(TheInteger,AnIntegerType)
-TTI_HAS_TYPE_CHECK_TYPEDEF(CType)
-TTI_HAS_TYPE_CHECK_TYPEDEF(AnotherIntegerType)
-TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(SomethingElse,someOtherType)
-TTI_HAS_TYPE_CHECK_TYPEDEF(NoOtherType)
+TTI_HAS_TYPE(AnIntType)
+TTI_TRAIT_HAS_TYPE(NameStruct,AStructType)
+TTI_HAS_TYPE(AnIntTypeReference)
+TTI_HAS_TYPE(BType)
+TTI_TRAIT_HAS_TYPE(TheInteger,AnIntegerType)
+TTI_HAS_TYPE(CType)
+TTI_HAS_TYPE(AnotherIntegerType)
+TTI_TRAIT_HAS_TYPE(SomethingElse,someOtherType)
+TTI_HAS_TYPE(NoOtherType)
 
 #endif // TEST_HAS_TYPE_CHECK_TYPEDEF_HPP

Modified: sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefCompile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefCompile.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefCompile.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -7,17 +7,17 @@
   // You can always instantiate without compiler errors
   
   tti::TheInteger<AType::BType,short> aVar;
- tti::has_type_check_typedef_NoOtherType<AnotherType,double> aVar2;
+ tti::has_type_NoOtherType<AnotherType,double> aVar2;
   
   // Compile time asserts
   
- BOOST_MPL_ASSERT((tti::has_type_check_typedef_AnIntType<AType,int>));
+ BOOST_MPL_ASSERT((tti::has_type_AnIntType<AType,int>));
   BOOST_MPL_ASSERT((tti::NameStruct<AType,AType::AStructType>));
- BOOST_MPL_ASSERT((tti::has_type_check_typedef_AnIntTypeReference<AType,int &>));
- BOOST_MPL_ASSERT((tti::has_type_check_typedef_BType<AType,AType::BType>));
+ BOOST_MPL_ASSERT((tti::has_type_AnIntTypeReference<AType,int &>));
+ BOOST_MPL_ASSERT((tti::has_type_BType<AType,AType::BType>));
   BOOST_MPL_ASSERT((tti::TheInteger<AType::BType,int>));
- BOOST_MPL_ASSERT((tti::has_type_check_typedef_CType<AType::BType,AType::BType::CType>));
- BOOST_MPL_ASSERT((tti::has_type_check_typedef_AnotherIntegerType<AType::BType::CType,int>));
+ BOOST_MPL_ASSERT((tti::has_type_CType<AType::BType,AType::BType::CType>));
+ BOOST_MPL_ASSERT((tti::has_type_AnotherIntegerType<AType::BType::CType,int>));
   BOOST_MPL_ASSERT((tti::SomethingElse<AnotherType,AType::AnIntType>));
   
   return 0;

Modified: sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -6,7 +6,7 @@
   
   // NoOtherType does not exist at all
   
- BOOST_MPL_ASSERT((tti::has_type_check_typedef_NoOtherType<AType,int>));
+ BOOST_MPL_ASSERT((tti::has_type_NoOtherType<AType,int>));
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail2.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail2.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -6,7 +6,7 @@
   
   // Wrong enclosing type
   
- BOOST_MPL_ASSERT((tti::has_type_check_typedef_BType<AnotherType,short>));
+ BOOST_MPL_ASSERT((tti::has_type_BType<AnotherType,short>));
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail4.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail4.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail4.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -5,7 +5,7 @@
   
   // Typedef type does not exist ( BType is a nested type )
   
- tti::has_type_check_typedef_BType<AType,BType> aVar;
+ tti::has_type_BType<AType,BType> aVar;
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail5.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail5.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasTypeCheckTypedefFail5.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -6,7 +6,7 @@
   
   // Wrong typedef type
   
- BOOST_MPL_ASSERT((tti::has_type_check_typedef_AnotherIntegerType<AType::BType::CType,long>));
+ BOOST_MPL_ASSERT((tti::has_type_AnotherIntegerType<AType::BType::CType,long>));
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -4,16 +4,16 @@
 int main()
   {
   
- BOOST_TEST((tti::mf_has_type_check_typedef
+ BOOST_TEST((tti::mf_has_type
                 <
- tti::has_type_check_typedef_AnIntType,
+ tti::has_type_AnIntType,
                 boost::mpl::identity<AType>,
                 boost::mpl::identity<int>
>
               ::value
             ));
             
- BOOST_TEST((tti::mf_has_type_check_typedef
+ BOOST_TEST((tti::mf_has_type
                 <
                 tti::NameStruct,
                 boost::mpl::identity<AType>,
@@ -22,25 +22,25 @@
               ::value
             ));
             
- BOOST_TEST((tti::mf_has_type_check_typedef
+ BOOST_TEST((tti::mf_has_type
                 <
- tti::has_type_check_typedef_AnIntTypeReference,
+ tti::has_type_AnIntTypeReference,
                 boost::mpl::identity<AType>,
                 boost::mpl::identity<int &>
>
               ::value
             ));
             
- BOOST_TEST((tti::mf_has_type_check_typedef
+ BOOST_TEST((tti::mf_has_type
                 <
- tti::has_type_check_typedef_BType,
+ tti::has_type_BType,
                 boost::mpl::identity<AType>,
                 tti::member_type_BType<AType>
>
               ::value
             ));
             
- BOOST_TEST((tti::mf_has_type_check_typedef
+ BOOST_TEST((tti::mf_has_type
                 <
                 tti::TheInteger,
                 tti::member_type_BType<AType>,
@@ -49,9 +49,9 @@
               ::value
             ));
             
- BOOST_TEST((tti::mf_has_type_check_typedef
+ BOOST_TEST((tti::mf_has_type
                 <
- tti::has_type_check_typedef_CType,
+ tti::has_type_CType,
                 tti::member_type_BType<AType>,
                 tti::mf_member_type
                   <
@@ -62,9 +62,9 @@
               ::value
             ));
             
- BOOST_TEST((tti::mf_has_type_check_typedef
+ BOOST_TEST((tti::mf_has_type
                 <
- tti::has_type_check_typedef_AnotherIntegerType,
+ tti::has_type_AnotherIntegerType,
                 tti::mf_member_type
                   <
                   tti::member_type_CType,
@@ -75,7 +75,7 @@
               ::value
             ));
             
- BOOST_TEST((tti::mf_has_type_check_typedef
+ BOOST_TEST((tti::mf_has_type
                 <
                 tti::SomethingElse,
                 boost::mpl::identity<AnotherType>,
@@ -84,9 +84,9 @@
               ::value
             ));
             
- BOOST_TEST((!tti::mf_has_type_check_typedef
+ BOOST_TEST((!tti::mf_has_type
                 <
- tti::has_type_check_typedef_NoOtherType,
+ tti::has_type_NoOtherType,
                 boost::mpl::identity<AnotherType>,
                 boost::mpl::identity<double>
>

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.hpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.hpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -4,15 +4,15 @@
 #include "TestStructs.hpp"
 #include <boost/tti/TTIntrospection.hpp>
 
-TTI_HAS_TYPE_CHECK_TYPEDEF(AnIntType)
-TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(NameStruct,AStructType)
-TTI_HAS_TYPE_CHECK_TYPEDEF(AnIntTypeReference)
-TTI_HAS_TYPE_CHECK_TYPEDEF(BType)
-TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(TheInteger,AnIntegerType)
-TTI_HAS_TYPE_CHECK_TYPEDEF(CType)
-TTI_HAS_TYPE_CHECK_TYPEDEF(AnotherIntegerType)
-TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(SomethingElse,someOtherType)
-TTI_HAS_TYPE_CHECK_TYPEDEF(NoOtherType)
+TTI_HAS_TYPE(AnIntType)
+TTI_TRAIT_HAS_TYPE(NameStruct,AStructType)
+TTI_HAS_TYPE(AnIntTypeReference)
+TTI_HAS_TYPE(BType)
+TTI_TRAIT_HAS_TYPE(TheInteger,AnIntegerType)
+TTI_HAS_TYPE(CType)
+TTI_HAS_TYPE(AnotherIntegerType)
+TTI_TRAIT_HAS_TYPE(SomethingElse,someOtherType)
+TTI_HAS_TYPE(NoOtherType)
 
 TTI_MEMBER_TYPE(AStructType)
 TTI_MEMBER_TYPE(BType)

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefCompile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefCompile.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefCompile.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -6,31 +6,31 @@
   
   // You can always instantiate without compiler errors
   
- tti::mf_has_type_check_typedef
+ tti::mf_has_type
     <
     tti::TheInteger,
     tti::member_type_BType<AnotherType>,
     boost::mpl::identity<long>
> aVar;
     
- tti::mf_has_type_check_typedef
+ tti::mf_has_type
     <
- tti::has_type_check_typedef_NoOtherType,
+ tti::has_type_NoOtherType,
     boost::mpl::identity<AType>,
     boost::mpl::identity<float>
> aVar2;
   
   // Compile time asserts
   
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                 <
- tti::has_type_check_typedef_AnIntType,
+ tti::has_type_AnIntType,
                 boost::mpl::identity<AType>,
                 boost::mpl::identity<int>
>
             ));
             
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                 <
                 tti::NameStruct,
                 boost::mpl::identity<AType>,
@@ -38,23 +38,23 @@
>
             ));
             
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                 <
- tti::has_type_check_typedef_AnIntTypeReference,
+ tti::has_type_AnIntTypeReference,
                 boost::mpl::identity<AType>,
                 boost::mpl::identity<int &>
>
             ));
             
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                 <
- tti::has_type_check_typedef_BType,
+ tti::has_type_BType,
                 boost::mpl::identity<AType>,
                 tti::member_type_BType<AType>
>
             ));
             
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                 <
                 tti::TheInteger,
                 tti::member_type_BType<AType>,
@@ -62,9 +62,9 @@
>
             ));
             
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                 <
- tti::has_type_check_typedef_CType,
+ tti::has_type_CType,
                 tti::member_type_BType<AType>,
                 tti::mf_member_type
                   <
@@ -74,9 +74,9 @@
>
             ));
             
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                 <
- tti::has_type_check_typedef_AnotherIntegerType,
+ tti::has_type_AnotherIntegerType,
                 tti::mf_member_type
                   <
                   tti::member_type_CType,
@@ -86,7 +86,7 @@
>
             ));
             
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                 <
                 tti::SomethingElse,
                 boost::mpl::identity<AnotherType>,

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -6,9 +6,9 @@
   
   // NoOtherType does not exist at all
   
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                       <
- tti::has_type_check_typedef_NoOtherType,
+ tti::has_type_NoOtherType,
                       boost::mpl::identity<AnotherType>,
                       boost::mpl::identity<float>
>

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail2.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail2.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -6,9 +6,9 @@
   
   // Wrong enclosing type
   
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                       <
- tti::has_type_check_typedef_BType,
+ tti::has_type_BType,
                       boost::mpl::identity<AnotherType>,
                       tti::member_type_BType<AType>
>

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail3.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail3.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail3.cpp 2011-01-25 19:58:45 EST (Tue, 25 Jan 2011)
@@ -6,7 +6,7 @@
   
   // Wrong typedef type
   
- BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ BOOST_MPL_ASSERT((tti::mf_has_type
                       <
                       tti::TheInteger,
                       tti::member_type_BType<AType>,


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk