Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84362 - in trunk: boost/tti libs/tti/doc
From: eldiener_at_[hidden]
Date: 2013-05-19 00:47:16


Author: eldiener
Date: 2013-05-19 00:47:15 EDT (Sun, 19 May 2013)
New Revision: 84362
URL: http://svn.boost.org/trac/boost/changeset/84362

Log:
Updated documentation.
Removed:
   trunk/libs/tti/doc/tti_detail_has_template_check_params.qbk
Text files modified:
   trunk/boost/tti/has_template.hpp | 4 ++--
   trunk/libs/tti/doc/tti_detail_has_member_data.qbk | 2 +-
   trunk/libs/tti/doc/tti_functionality.qbk | 6 +++---
   trunk/libs/tti/doc/tti_nested_type.qbk | 2 +-
   4 files changed, 7 insertions(+), 7 deletions(-)

Modified: trunk/boost/tti/has_template.hpp
==============================================================================
--- trunk/boost/tti/has_template.hpp (original)
+++ trunk/boost/tti/has_template.hpp 2013-05-19 00:47:15 EDT (Sun, 19 May 2013)
@@ -32,7 +32,7 @@
 /**
 
     trait = the name of the metafunction.
- ... = variadic paramaters.
+ ... = variadic parameters.
     
             The first variadic parameter is the inner class template name.
             
@@ -124,7 +124,7 @@
 /// Expands to a metafunction which tests whether an inner class template with a particular name exists.
 /**
 
- ... = variadic paramaters.
+ ... = variadic parameters.
     
             The first variadic parameter is the inner class template name.
             

Modified: trunk/libs/tti/doc/tti_detail_has_member_data.qbk
==============================================================================
--- trunk/libs/tti/doc/tti_detail_has_member_data.qbk (original)
+++ trunk/libs/tti/doc/tti_detail_has_member_data.qbk 2013-05-19 00:47:15 EDT (Sun, 19 May 2013)
@@ -44,7 +44,7 @@
 [heading Invoking the metafunction]
 
 You invoke the metafunction by instantiating the template with an enclosing
-type to introspect and the type of the member data, or by instantating the
+type to introspect and the type of the member data, or by instantiating the
 template with a pointer to member data type. The return value called 'value'
 is a compile time bool constant telling you whether or not the member data .
 exists.

Deleted: trunk/libs/tti/doc/tti_detail_has_template_check_params.qbk
==============================================================================
--- trunk/libs/tti/doc/tti_detail_has_template_check_params.qbk 2013-05-19 00:47:15 EDT (Sun, 19 May 2013)
+++ (empty file)
@@ -1,175 +0,0 @@
-[/
- (C) Copyright Edward Diener 2011
- Use, modification and distribution are subject to the Boost Software License,
- Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt).
-]
-
-[section:tti_detail_has_template_check_params Introspecting an inner class template with specific parameters]
-
-The TTI macro [macroref BOOST_TTI_HAS_TEMPLATE],
-besides being used to introspect an inner class template
-with all class ( or typename ) template parameters,
-can also be used to introspect an inner class template
-with specific template parameters.
-
-BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS takes
-two macro parameters. The first is the name of an inner class template
-whose existence the programmer wants to check. The second is a Boost PP
-sequence which specifies the template parameters of the inner class
-template to check. The macro generates a metafunction called
-'has_template_check_params_'name_of_inner_class_template'.
-
-The metafunction can be invoked by passing it the enclosing type to
-introspect.
-
-The metafunction returns a single type called 'type', which is a
-boost::mpl::bool_. As a convenience the metafunction returns the
-value of this type directly as a compile time bool constant
-called 'value'. This is true or false depending on whether the inner
-class template, with the template parameters specified, exists or not.
-
-[heading Generating the metafunction]
-
-You generate the metafunction by invoking the macro with the name
-of an inner class template, as well as its template parameters as
-a Boost PP sequence:
-
- BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS(AType,(class X)(int Y))
-
-generates a metafunction called 'has_template_check_params_AType' in the current scope.
-
-[heading Invoking the metafunction]
-
-You invoke the metafunction by instantiating the template with an enclosing
-type to introspect. A return value called 'value' is a compile time bool constant.
-
- has_template_check_params_AType<Enclosing_Type>::value
-
-[heading Examples]
-
-First we generate metafunctions for various inner class template names
-and corresponding template parameters:
-
- #include <boost/tti/has_template_check_params.hpp>
-
- BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS(Template1,(class X)(int Y))
- BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS(Template2,(typename A)(template<class)(class> struct B)(long C))
- BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS(Template3,(double X)(typename Y))
- BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS(Template4,(typename A)(class B)(typename C)(class D)(typename E)(short F))
-
-Next let us create some user-defined types we want to introspect.
-
- struct Top
- {
- template <class X,int Y> struct Template1 { };
- template <typename A,template<class,class> struct B,long C> class Template2 { };
- };
- struct Top2
- {
- template <double X,typename Y> struct Template3 { };
- template <typename A,class B,typename C,class D,typename E,short F> class Template4 { };
- };
-
-Finally we invoke our metafunction and return our value.
-This all happens at compile time, and can be used by
-programmers doing compile time template metaprogramming.
-
- has_template_check_params_Template1<Top>::value; // true
- has_template_check_params_Template1<Top2>::value; // false
-
- has_template_check_params_Template2<Top>::value; // true
- has_template_check_params_Template2<Top2>::value; // false
-
- has_template_check_params_Template3<Top>::value; // false
- has_template_check_params_Template3<Top2>::value; // true
-
- has_template_check_params_Template4<Top>::value; // false
- has_template_check_params_Template4<Top2>::value; // true
-
-It should be noticed that once we create our metafunction for
-introspecting an inner class template by name, with its corresponding
-template parameters, we can reuse the metafunction for introspecting
-any enclosing user-defined type for that same inner class template name,
-with its corresponding template parameters.
-
-[heading Alternate form when variadic macros are supported]
-
-An alternate form of the macro, which uses a variadic macro for
-compilers which support them, is called
-[macroref BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS]. In this form
-the first parameter is still the name of an inner class template
-whose existence the programmer wants to check. Subsequent parameters
-are the the template parameters of the inner class template to check,
-each as an individual macro parameter. The macro generates a
-metafunction with the same name as the non-variadic macro form,
-namely 'has_template_check_params_'name_of_inner_class_template'.
-
-In all other respects the metafunction works exactly the same
-as the one that is generated from BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS.
-
-[heading Generating the metafunction from the variadic macro]
-
-You generate the metafunction by invoking the macro with the name
-of an inner class template, as well as its template parameters as
-a Boost PP sequence:
-
- BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS(AType,class X,int Y)
-
-generates a metafunction called 'has_template_check_params_AType' in the current scope.
-
-[heading Invoking the metafunction created by the variadic macro]
-
-You invoke the metafunction by instantiating the template with an enclosing
-type to introspect. A return value called 'value' is a compile time bool constant.
-
- has_template_check_params_AType<Enclosing_Type>::value
-
-[heading Examples of the variadic macro form]
-
-First we generate metafunctions for various inner class template names
-and corresponding template parameters:
-
- #include <boost/tti/vm_has_template_check_params.hpp>
-
- BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS(Template1,class X,int Y)
- BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS(Template2,typename A,template<class,class> struct B,long C)
- BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS(Template3,double X,typename Y)
- BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS(Template4,typename A,class B,typename C,class D,typename E,short F)
-
-Next let us create some user-defined types we want to introspect.
-
- struct Top
- {
- template <class X,int Y> struct Template1 { };
- template <typename A,template<class,class> struct B,long C> class Template2 { };
- };
- struct Top2
- {
- template <double X,typename Y> struct Template3 { };
- template <typename A,class B,typename C,class D,typename E,short F> class Template4 { };
- };
-
-Finally we invoke our metafunction and return our value.
-This all happens at compile time, and can be used by
-programmers doing compile time template metaprogramming.
-
- has_template_check_params_Template1<Top>::value; // true
- has_template_check_params_Template1<Top2>::value; // false
-
- has_template_check_params_Template2<Top>::value; // true
- has_template_check_params_Template2<Top2>::value; // false
-
- has_template_check_params_Template3<Top>::value; // false
- has_template_check_params_Template3<Top2>::value; // true
-
- has_template_check_params_Template4<Top>::value; // false
- has_template_check_params_Template4<Top2>::value; // true
-
-Just as before it should be noticed that once we create our metafunction for
-introspecting an inner class template by name, with its corresponding
-template parameters, we can reuse the metafunction for introspecting
-any enclosing user-defined type for that name, with its corresponding
-template parameters.
-
-[endsect]

Modified: trunk/libs/tti/doc/tti_functionality.qbk
==============================================================================
--- trunk/libs/tti/doc/tti_functionality.qbk (original)
+++ trunk/libs/tti/doc/tti_functionality.qbk 2013-05-19 00:47:15 EDT (Sun, 19 May 2013)
@@ -150,11 +150,11 @@
 
 # 'has_member_function_AMemberFunction<CType,int,boost::mpl::vector<int> >::value' is a
 compile time constant telling us whether 'AMemberFunction' is a member function of type 'CType'
-whose function signtaure is 'int (int)'.
+whose function signature is 'int (int)'.
 
 # 'has_member_function_AMemberFunction<CType,double,boost::mpl::vector<long> >::value' is a
 compile time constant telling us whether 'AMemberFunction' is a member function of type 'CType'
-whose function signtaure is 'double (long)'.
+whose function signature is 'double (long)'.
 
 These are just two examples of the ways a particular macro metafunction can be reused. The two
 'constants' when generating a macro metafunction are the 'name' and 'type of inner element'. Once
@@ -193,7 +193,7 @@
 if the metafunction being generated by TTI is named 'MyMetafunction' using the complex
 macro form, do not create any C++ construct with an identifier starting with 'MyMetaFunction',
 such as 'MyMetaFunction_Enumeration' or 'MyMetaFunctionHelper' in the same scope.
-All names starting wih the metafunction name in the current scope should be considered
+All names starting with the metafunction name in the current scope should be considered
 out of bounds for the programmer using TTI.
 
 [endsect]

Modified: trunk/libs/tti/doc/tti_nested_type.qbk
==============================================================================
--- trunk/libs/tti/doc/tti_nested_type.qbk (original)
+++ trunk/libs/tti/doc/tti_nested_type.qbk 2013-05-19 00:47:15 EDT (Sun, 19 May 2013)
@@ -169,7 +169,7 @@
     
     class T = a metafunction type
     
- returns = true if the return 'type' of the meatfunction exists,
+ returns = true if the return 'type' of the metafunction exists,
               false if it does not.'Existence' is determined by whether
               the return 'type' does not equal the marker type of
               BOOST_TTI_MEMBER_TYPE.


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