Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84378 - in branches/release: boost/tti libs/tti libs/tti/doc
From: eldiener_at_[hidden]
Date: 2013-05-19 16:03:26


Author: eldiener
Date: 2013-05-19 16:03:25 EDT (Sun, 19 May 2013)
New Revision: 84378
URL: http://svn.boost.org/trac/boost/changeset/84378

Log:
Moved TTI library to release.
Added:
   branches/release/boost/tti/
      - copied from r84354, /trunk/boost/tti/
   branches/release/boost/tti/has_template.hpp
      - copied unchanged from r84362, /trunk/boost/tti/has_template.hpp
   branches/release/libs/tti/
      - copied from r84354, /trunk/libs/tti/
   branches/release/libs/tti/doc/tti_detail_has_member_data.qbk
      - copied unchanged from r84362, /trunk/libs/tti/doc/tti_detail_has_member_data.qbk
   branches/release/libs/tti/doc/tti_functionality.qbk
      - copied unchanged from r84362, /trunk/libs/tti/doc/tti_functionality.qbk
   branches/release/libs/tti/doc/tti_nested_type.qbk
      - copied unchanged from r84362, /trunk/libs/tti/doc/tti_nested_type.qbk
Removed:
   branches/release/libs/tti/doc/tti_detail_has_template_check_params.qbk

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 16:03:25 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]


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