|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69672 - in sandbox/tti: boost/tti boost/tti/detail libs/tti/doc libs/tti/test
From: eldiener_at_[hidden]
Date: 2011-03-07 21:21:36
Author: eldiener
Date: 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
New Revision: 69672
URL: http://svn.boost.org/trac/boost/changeset/69672
Log:
Function template functionality.
Added:
sandbox/tti/boost/tti/comp_mem_fun_template.hpp (contents, props changed)
sandbox/tti/boost/tti/comp_mem_fun_template_params.hpp (contents, props changed)
sandbox/tti/boost/tti/comp_static_mem_fun_template.hpp (contents, props changed)
sandbox/tti/boost/tti/comp_static_mem_fun_template_params.hpp (contents, props changed)
sandbox/tti/boost/tti/detail/dcomp_mem_fun_template.hpp (contents, props changed)
sandbox/tti/boost/tti/detail/dcomp_static_mem_fun_template.hpp (contents, props changed)
sandbox/tti/boost/tti/detail/dmem_fun_template_params.hpp (contents, props changed)
sandbox/tti/boost/tti/detail/dstatic_mem_data.hpp (contents, props changed)
sandbox/tti/boost/tti/detail/dstatic_mem_fun_template_params.hpp (contents, props changed)
sandbox/tti/boost/tti/mem_fun_template_params.hpp (contents, props changed)
sandbox/tti/boost/tti/static_mem_data.hpp (contents, props changed)
sandbox/tti/boost/tti/static_mem_fun_template_params.hpp (contents, props changed)
sandbox/tti/boost/tti/vm_comp_mem_fun_template.hpp (contents, props changed)
sandbox/tti/boost/tti/vm_comp_static_mem_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_mem_fun_template.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_mem_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_mem_fun_template_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_mem_fun_template_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_mem_fun_template_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_data.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_data.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_data_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_data_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_data_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_data_fail3.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_fun_template.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail3.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_static_fun_template.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_static_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail3.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail3.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template.hpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_compile.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail2.cpp (contents, props changed)
sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail3.cpp (contents, props changed)
Removed:
sandbox/tti/libs/tti/test/test_has_static_member_fail5.cpp
Text files modified:
sandbox/tti/boost/tti/detail/dmem_fun_template.hpp | 10 ++--
sandbox/tti/boost/tti/detail/dstatic_mem.hpp | 9 ++-
sandbox/tti/boost/tti/detail/dstatic_mem_fun.hpp | 1
sandbox/tti/boost/tti/detail/dstatic_mem_fun_template.hpp | 11 ++--
sandbox/tti/boost/tti/mem_fun_template.hpp | 40 ++++-------------
sandbox/tti/boost/tti/static_mem_fun.hpp | 1
sandbox/tti/boost/tti/static_mem_fun_template.hpp | 43 +++++-------------
sandbox/tti/boost/tti/static_member.hpp | 67 +++++------------------------
sandbox/tti/boost/tti/tti.hpp | 6 +
sandbox/tti/boost/tti/vm_mem_fun_template.hpp | 89 ++++++++++++++++++++++++++-------------
sandbox/tti/boost/tti/vm_static_mem_fun_template.hpp | 84 +++++++++++++++++++++++++------------
sandbox/tti/libs/tti/doc/build.txt | 2
sandbox/tti/libs/tti/doc/tti_history.qbk | 6 ++
sandbox/tti/libs/tti/doc/tti_tests.qbk | 2
sandbox/tti/libs/tti/test/Jamfile.v2 | 45 +++++++++++++++++++
sandbox/tti/libs/tti/test/test_has_static_member.cpp | 2
sandbox/tti/libs/tti/test/test_has_static_member.hpp | 2
sandbox/tti/libs/tti/test/test_has_static_member_compile.cpp | 2
sandbox/tti/libs/tti/test/test_has_static_member_fail.cpp | 4
sandbox/tti/libs/tti/test/test_has_static_member_fail2.cpp | 5 -
sandbox/tti/libs/tti/test/test_has_static_member_fail4.cpp | 4
sandbox/tti/libs/tti/test/test_mf_has_static_data.cpp | 8 +-
sandbox/tti/libs/tti/test/test_mf_has_static_data.hpp | 10 ++--
sandbox/tti/libs/tti/test/test_mf_has_static_data_compile.cpp | 12 ++--
sandbox/tti/libs/tti/test/test_mf_has_static_data_fail.cpp | 4
sandbox/tti/libs/tti/test/test_mf_has_static_data_fail2.cpp | 4
sandbox/tti/libs/tti/test/test_mf_has_static_data_fail3.cpp | 4
sandbox/tti/libs/tti/test/test_structs.hpp | 24 ++++++++++
sandbox/tti/libs/tti/test/test_vm_has_template_cp.hpp | 2
sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail.cpp | 4 +
sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail2.cpp | 4 +
sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail3.cpp | 4 +
sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail4.cpp | 4 +
sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp.hpp | 2
sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail.cpp | 4 +
sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail2.cpp | 4 +
sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail3.cpp | 4 +
37 files changed, 302 insertions(+), 231 deletions(-)
Added: sandbox/tti/boost/tti/comp_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/comp_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,142 @@
+#if !defined(TTI_COMP_MEM_FUN_TEMPLATE_HPP)
+#define TTI_COMP_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include "detail/dcomp_mem_fun_template.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a member function template with a particular name exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ name = the name of the inner member.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,name) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_NIL) \
+ } \
+ template<class T> \
+ struct trait : \
+ detail::trait<T> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a member function template with a particular name exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ name = the name of the inner member.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,name) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_NIL) \
+ } \
+ struct trait \
+ { \
+ template<class T> \
+ struct apply : \
+ detail::trait<T> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction which tests whether a member function template with a particular name exists.
+/**
+
+ name = the name of the inner member.
+
+ returns = a metafunction called "boost::tti::has_comp_member_function_template_name" where 'name' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(name) \
+ BOOST_TTI_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ BOOST_PP_CAT(has_comp_member_function_template_,name), \
+ name \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a member function template with a particular name exists.
+/**
+
+ name = the name of the inner member.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_comp_member_function_template_name" where 'name' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(name) \
+ BOOST_TTI_MTFC_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ BOOST_PP_CAT(mtfc_has_comp_member_function_template_,name), \
+ name \
+ ) \
+/**/
+
+#endif // TTI_COMP_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/boost/tti/comp_mem_fun_template_params.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/comp_mem_fun_template_params.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,163 @@
+#if !defined(TTI_COMP_MEM_FUN_TEMPLATE_PARAMS_HPP)
+#define TTI_COMP_MEM_FUN_TEMPLATE_PARAMS_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/to_tuple.hpp>
+#include <boost/preprocessor/tuple/to_list.hpp>
+#include "detail/dcomp_mem_fun_template.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a member function template with a particular name and signature exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(tpseq),BOOST_PP_SEQ_TO_TUPLE(tpseq))) \
+ } \
+ template<class T> \
+ struct trait : \
+ detail::trait<T> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a member function template with a particular name and signature exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(tpseq),BOOST_PP_SEQ_TO_TUPLE(tpseq))) \
+ } \
+ struct trait \
+ { \
+ template<class T> \
+ struct apply : \
+ detail::trait<T> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction which tests whether a member function template with a particular name and signature exists.
+/**
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction called "boost::tti::has_comp_member_function_template_name" where 'name' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_HAS_COMP_MEMBER_FUNCTION_TEMPLATE_PARAMS(name,tpseq) \
+ BOOST_TTI_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE_PARAMS \
+ ( \
+ BOOST_PP_CAT(has_comp_member_function_template_,name), \
+ name, \
+ tpseq \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a member function template with a particular name and signature exists.
+/**
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_comp_member_function_template_name" where 'name' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_HAS_COMP_MEMBER_FUNCTION_TEMPLATE_PARAMS(name,tpseq) \
+ BOOST_TTI_MTFC_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE_PARAMS \
+ ( \
+ BOOST_PP_CAT(mtfc_has_comp_member_function_template_,name), \
+ name, \
+ tpseq \
+ ) \
+/**/
+
+#endif // TTI_COMP_MEM_FUN_TEMPLATE_PARAMS_HPP
Added: sandbox/tti/boost/tti/comp_static_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/comp_static_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,159 @@
+#if !defined(TTI_COMP_STATIC_MEM_FUN_TEMPLATE_HPP)
+#define TTI_COMP_STATIC_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include "detail/dcomp_static_mem_fun_template.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a static member function template with a particular name and composite type exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ name = the name of the inner member.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_NIL) \
+ } \
+ template<class T,class Type> \
+ struct trait : \
+ detail::trait<T,Type> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member function template with a particular name and composite type exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ name = the name of the inner member.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_NIL) \
+ } \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply : \
+ detail::trait::apply<T,Type> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+
+/// Expands to a metafunction which tests whether a static member function template with a particular name and composite type exists.
+/**
+
+ name = the name of the inner member.
+
+ returns = a metafunction called "boost::tti::has_comp_static_member_function_template_name" where 'name' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(name) \
+ BOOST_TTI_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ BOOST_PP_CAT(has_comp_static_member_function_template_,name), \
+ name \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member function template with a particular name and composite type exists.
+/**
+
+ name = the name of the inner member.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_comp_static_member_function_template_name" where 'name' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(name) \
+ BOOST_TTI_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ BOOST_PP_CAT(mtfc_has_comp_static_member_function_template_,name), \
+ name \
+ ) \
+/**/
+
+#endif // TTI_COMP_STATIC_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/boost/tti/comp_static_mem_fun_template_params.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/comp_static_mem_fun_template_params.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,180 @@
+#if !defined(TTI_COMP_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP)
+#define TTI_COMP_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/to_tuple.hpp>
+#include <boost/preprocessor/tuple/to_list.hpp>
+#include "detail/dcomp_static_mem_fun_template.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a static member function template with a particular name/signature and composite type exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(tpseq),BOOST_PP_SEQ_TO_TUPLE(tpseq))) \
+ } \
+ template<class T,class Type> \
+ struct trait : \
+ detail::trait<T,Type> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member function template with a particular name/signature and composite type exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(tpseq),BOOST_PP_SEQ_TO_TUPLE(tpseq))) \
+ } \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply : \
+ detail::trait::apply<T,Type> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+
+/// Expands to a metafunction which tests whether a static member function template with a particular name/signature and composite type exists.
+/**
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction called "boost::tti::has_comp_static_member_function_template_name" where 'name' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(name,tpseq) \
+ BOOST_TTI_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS \
+ ( \
+ BOOST_PP_CAT(has_comp_static_member_function_template_,name), \
+ name, \
+ tpseq \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member function template with a particular name/signature and composite type exists.
+/**
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_comp_static_member_function_template_name" where 'name' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(name,tpseq) \
+ BOOST_TTI_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS \
+ ( \
+ BOOST_PP_CAT(mtfc_has_comp_static_member_function_template_,name), \
+ name, \
+ tpseq \
+ ) \
+/**/
+
+#endif // TTI_COMP_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP
Added: sandbox/tti/boost/tti/detail/dcomp_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/detail/dcomp_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,109 @@
+#if !defined(TTI_DETAIL_COMP_MEM_FUN_TEMPLATE_HPP)
+#define TTI_DETAIL_COMP_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/quote.hpp>
+#include <boost/function_types/parameter_types.hpp>
+#include <boost/preprocessor/list/enum.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+
+#if defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
+ template<class T> \
+ struct trait \
+ { \
+ template<class F> \
+ struct class_type \
+ { \
+ typedef typename \
+ boost::remove_const \
+ < \
+ typename \
+ boost::mpl::at \
+ < \
+ typename \
+ boost::function_types::parameter_types \
+ < \
+ F, \
+ boost::mpl::quote1 \
+ < \
+ boost::mpl::identity \
+ > \
+ > \
+ ::type, \
+ boost::mpl::int_<0> \
+ >::type \
+ >::type \
+ type; \
+ }; \
+ \
+ template<T> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<typename class_type<T>::type>(0))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#else // !defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
+ template<class T> \
+ struct trait \
+ { \
+ template<class F> \
+ struct class_type \
+ { \
+ typedef typename \
+ boost::remove_const \
+ < \
+ typename \
+ boost::mpl::at \
+ < \
+ typename \
+ boost::function_types::parameter_types \
+ < \
+ F, \
+ boost::mpl::quote1 \
+ < \
+ boost::mpl::identity \
+ > \
+ > \
+ ::type, \
+ boost::mpl::int_<0> \
+ >::type \
+ >::type \
+ type; \
+ }; \
+ \
+ template<T> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<typename class_type<T>::type>(nullptr))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#endif // defined(BOOST_NO_NULLPTR)
+
+#endif // TTI_DETAIL_COMP_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/boost/tti/detail/dcomp_static_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/detail/dcomp_static_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,97 @@
+#if !defined(TTI_DETAIL_COMP_STATIC_MEM_FUN_TEMPLATE_HPP)
+#define TTI_DETAIL_COMP_STATIC_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+#include <boost/function_types/is_function.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+
+#if defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
+ template<class T,class Type> \
+ struct trait \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#define TTI_DETAIL_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+ }; \
+/**/
+
+#else // !defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
+ template<class T,class Type> \
+ struct trait \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#define TTI_DETAIL_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+ }; \
+/**/
+
+#endif // defined(BOOST_NO_NULLPTR)
+
+#endif // TTI_DETAIL_COMP_STATIC_MEM_FUN_TEMPLATE_HPP
Modified: sandbox/tti/boost/tti/detail/dmem_fun_template.hpp
==============================================================================
--- sandbox/tti/boost/tti/detail/dmem_fun_template.hpp (original)
+++ sandbox/tti/boost/tti/detail/dmem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -3,13 +3,13 @@
#include <boost/config.hpp>
#include <boost/mpl/bool.hpp>
-#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/list/enum.hpp>
#include <boost/type_traits/detail/yes_no_type.hpp>
#include "dptmf.hpp"
#if defined(BOOST_NO_NULLPTR)
-#define TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+#define TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
template<class T,class C> \
struct trait \
{ \
@@ -17,7 +17,7 @@
struct helper; \
\
template<class U> \
- static ::boost::type_traits::yes_type check(helper<&U::name<BOOST_PP_SEQ_ENUM(tpseq)> > *); \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
\
template<class U> \
static ::boost::type_traits::no_type check(...); \
@@ -30,7 +30,7 @@
#else // !defined(BOOST_NO_NULLPTR)
-#define TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+#define TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
template<class T,class C> \
struct trait \
{ \
@@ -38,7 +38,7 @@
struct helper; \
\
template<class U> \
- static ::boost::type_traits::yes_type check(helper<&U::name<BOOST_PP_SEQ_ENUM(tpseq)> > *); \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
\
template<class U> \
static ::boost::type_traits::no_type check(...); \
Added: sandbox/tti/boost/tti/detail/dmem_fun_template_params.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/detail/dmem_fun_template_params.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,54 @@
+#if !defined(TTI_DETAIL_MEM_FUN_TEMPLATE_PARAMS_HPP)
+#define TTI_DETAIL_MEM_FUN_TEMPLATE_PARAMS_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include "dptmf.hpp"
+
+#if defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+ template<class T,class C> \
+ struct trait \
+ { \
+ template<T> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::name<BOOST_PP_SEQ_ENUM(tpseq)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<C>(0))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#else // !defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+ template<class T,class C> \
+ struct trait \
+ { \
+ template<T> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::name<BOOST_PP_SEQ_ENUM(tpseq)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<C>(nullptr))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#endif // defined(BOOST_NO_NULLPTR)
+
+#endif // TTI_DETAIL_MEM_FUN_TEMPLATE_PARAMS_HPP
Modified: sandbox/tti/boost/tti/detail/dstatic_mem.hpp
==============================================================================
--- sandbox/tti/boost/tti/detail/dstatic_mem.hpp (original)
+++ sandbox/tti/boost/tti/detail/dstatic_mem.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -2,6 +2,7 @@
#define TTI_DETAIL_STATIC_MEM_HPP
#include <boost/config.hpp>
+#include <boost/function_types/is_function.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/type_traits/detail/yes_no_type.hpp>
@@ -20,7 +21,7 @@
template<class U> \
static ::boost::type_traits::no_type check(...); \
\
- BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type)); \
+ BOOST_STATIC_CONSTANT(bool,value=(boost::function_types::is_function<Type>::value) && (sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type))); \
\
typedef boost::mpl::bool_<value> type; \
}; \
@@ -41,7 +42,7 @@
template<class U> \
static ::boost::type_traits::no_type check(...); \
\
- BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type)); \
+ BOOST_STATIC_CONSTANT(bool,value=(boost::function_types::is_function<Type>::value) && (sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type))); \
\
typedef boost::mpl::bool_<value> type; \
}; \
@@ -63,7 +64,7 @@
template<class U> \
static ::boost::type_traits::no_type check(...); \
\
- BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type)); \
+ BOOST_STATIC_CONSTANT(bool,value=(boost::function_types::is_function<Type>::value) && (sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type))); \
\
typedef boost::mpl::bool_<value> type; \
}; \
@@ -84,7 +85,7 @@
template<class U> \
static ::boost::type_traits::no_type check(...); \
\
- BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type)); \
+ BOOST_STATIC_CONSTANT(bool,value=(boost::function_types::is_function<Type>::value) && (sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type))); \
\
typedef boost::mpl::bool_<value> type; \
}; \
Added: sandbox/tti/boost/tti/detail/dstatic_mem_data.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/detail/dstatic_mem_data.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,194 @@
+#if !defined(TTI_DETAIL_STATIC_MEM_DATA_HPP)
+#define TTI_DETAIL_STATIC_MEM_DATA_HPP
+
+#include <boost/config.hpp>
+#include <boost/function_types/is_function.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+
+#if defined(BOOST_MSVC)
+
+#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+ template<class T,class Type> \
+ struct trait \
+ { \
+ template<bool,typename U> \
+ struct menable_if; \
+ \
+ template<typename U> \
+ struct menable_if<true,U> \
+ { \
+ typedef U type; \
+ }; \
+ \
+ template<typename U,typename V> \
+ static ::boost::type_traits::yes_type check2(V *); \
+ \
+ template<typename U,typename V> \
+ static ::boost::type_traits::no_type check2(U); \
+ \
+ template<typename U,typename V> \
+ static typename \
+ menable_if \
+ < \
+ sizeof(check2<U,V>(&U::name))==sizeof(::boost::type_traits::yes_type), \
+ ::boost::type_traits::yes_type \
+ > \
+ ::type \
+ has_matching_member(int); \
+ \
+ template<typename U,typename V> \
+ static ::boost::type_traits::no_type has_matching_member(...); \
+ \
+ template<class U,class V> \
+ struct ttc_sd \
+ { \
+ typedef boost::mpl::bool_<sizeof(has_matching_member<V,U>(0))==sizeof(::boost::type_traits::yes_type)> type; \
+ }; \
+ \
+ typedef typename ttc_sd<Type,T>::type type; \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=type::value); \
+ }; \
+/**/
+
+#define TTI_DETAIL_MTFC_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply \
+ { \
+ template<bool,typename U> \
+ struct menable_if; \
+ \
+ template<typename U> \
+ struct menable_if<true,U> \
+ { \
+ typedef U type; \
+ }; \
+ \
+ template<typename U,typename V> \
+ static ::boost::type_traits::yes_type check2(V *); \
+ \
+ template<typename U,typename V> \
+ static ::boost::type_traits::no_type check2(U); \
+ \
+ template<typename U,typename V> \
+ static typename \
+ menable_if \
+ < \
+ sizeof(check2<U,V>(&U::name))==sizeof(::boost::type_traits::yes_type), \
+ ::boost::type_traits::yes_type \
+ > \
+ ::type \
+ has_matching_member(int); \
+ \
+ template<typename U,typename V> \
+ static ::boost::type_traits::no_type has_matching_member(...); \
+ \
+ template<class U,class V> \
+ struct ttc_sd \
+ { \
+ typedef boost::mpl::bool_<sizeof(has_matching_member<V,U>(0))==sizeof(::boost::type_traits::yes_type)> type; \
+ }; \
+ \
+ typedef typename ttc_sd<Type,T>::type type; \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=type::value); \
+ }; \
+ }; \
+/**/
+
+#else // !defined(BOOST_MSVC)
+
+#if defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+ template<class T,class Type> \
+ struct trait \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::name> *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=(!boost::function_types::is_function<Type>::value) && (sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type))); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#define TTI_DETAIL_MTFC_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::name> *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=(!boost::function_types::is_function<Type>::value) && (sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type))); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+ }; \
+/**/
+
+#else // !defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+ template<class T,class Type> \
+ struct trait \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::name> *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=(!boost::function_types::is_function<Type>::value) && (sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type))); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#define TTI_DETAIL_MTFC_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::name> *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=(!boost::function_types::is_function<Type>::value) && (sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type))); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+ }; \
+/**/
+
+#endif // defined(BOOST_NO_NULLPTR)
+
+#endif // defined(BOOST_MSVC)
+
+#endif // TTI_DETAIL_STATIC_MEM_DATA_HPP
Modified: sandbox/tti/boost/tti/detail/dstatic_mem_fun.hpp
==============================================================================
--- sandbox/tti/boost/tti/detail/dstatic_mem_fun.hpp (original)
+++ sandbox/tti/boost/tti/detail/dstatic_mem_fun.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -4,7 +4,6 @@
#include <boost/config.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/type_traits/detail/yes_no_type.hpp>
-#include "dtfunction.hpp"
#if defined(BOOST_NO_NULLPTR)
Modified: sandbox/tti/boost/tti/detail/dstatic_mem_fun_template.hpp
==============================================================================
--- sandbox/tti/boost/tti/detail/dstatic_mem_fun_template.hpp (original)
+++ sandbox/tti/boost/tti/detail/dstatic_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -3,13 +3,12 @@
#include <boost/config.hpp>
#include <boost/mpl/bool.hpp>
-#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/list/enum.hpp>
#include <boost/type_traits/detail/yes_no_type.hpp>
-#include "dtfunction.hpp"
#if defined(BOOST_NO_NULLPTR)
-#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
template<class T,class Type> \
struct trait \
{ \
@@ -17,7 +16,7 @@
struct helper; \
\
template<class U> \
- static ::boost::type_traits::yes_type check(helper<&U::name<BOOST_PP_SEQ_ENUM(tpseq)> > *); \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
\
template<class U> \
static ::boost::type_traits::no_type check(...); \
@@ -30,7 +29,7 @@
#else // !defined(BOOST_NO_NULLPTR)
-#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tplst) \
template<class T,class Type> \
struct trait \
{ \
@@ -38,7 +37,7 @@
struct helper; \
\
template<class U> \
- static ::boost::type_traits::yes_type check(helper<&U::name<BOOST_PP_SEQ_ENUM(tpseq)> > *); \
+ static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_LIST_ENUM(tplst)> > *); \
\
template<class U> \
static ::boost::type_traits::no_type check(...); \
Added: sandbox/tti/boost/tti/detail/dstatic_mem_fun_template_params.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/detail/dstatic_mem_fun_template_params.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,54 @@
+#if !defined(TTI_DETAIL_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP)
+#define TTI_DETAIL_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include "dtfunction.hpp"
+
+#if defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+ template<class T,class Type> \
+ struct trait \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::name<BOOST_PP_SEQ_ENUM(tpseq)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(0))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#else // !defined(BOOST_NO_NULLPTR)
+
+#define TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+ template<class T,class Type> \
+ struct trait \
+ { \
+ template<Type *> \
+ struct helper; \
+ \
+ template<class U> \
+ static ::boost::type_traits::yes_type check(helper<&U::name<BOOST_PP_SEQ_ENUM(tpseq)> > *); \
+ \
+ template<class U> \
+ static ::boost::type_traits::no_type check(...); \
+ \
+ BOOST_STATIC_CONSTANT(bool,value=sizeof(check<T>(nullptr))==sizeof(::boost::type_traits::yes_type)); \
+ \
+ typedef boost::mpl::bool_<value> type; \
+ }; \
+/**/
+
+#endif // defined(BOOST_NO_NULLPTR)
+
+#endif // TTI_DETAIL_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP
Modified: sandbox/tti/boost/tti/mem_fun_template.hpp
==============================================================================
--- sandbox/tti/boost/tti/mem_fun_template.hpp (original)
+++ sandbox/tti/boost/tti/mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -18,17 +18,13 @@
/** \file
*/
-/// Expands to a metafunction which tests whether a member function template with a particular name and signature exists.
+/// Expands to a metafunction which tests whether a member function template with a particular name exists.
/**
trait = the name of the metafunction within the tti namespace.
name = the name of the inner member.
- tpseq = a Boost PP sequence which has the function template parameters.
- Each part of the template parameters separated by a comma ( , )
- is put in a separate sequence element.
-
returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
The metafunction types and return:
@@ -45,14 +41,14 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+#define BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name) \
namespace boost \
{ \
namespace tti \
{ \
namespace detail \
{ \
- TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+ TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_NIL) \
} \
template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
struct trait : \
@@ -70,10 +66,6 @@
name = the name of the inner member.
- tpseq = a Boost PP sequence which has the function template parameters.
- Each part of the template parameters separated by a comma ( , )
- is put in a separate sequence element.
-
returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.
The metafunction class's 'apply' metafunction types and return:
@@ -90,14 +82,14 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+#define BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name) \
namespace boost \
{ \
namespace tti \
{ \
namespace detail \
{ \
- TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+ TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_NIL) \
} \
struct trait \
{ \
@@ -111,15 +103,11 @@
} \
/**/
-/// Expands to a metafunction which tests whether a member function templaten with a particular name and signature exists.
+/// Expands to a metafunction which tests whether a member function templaten with a particular name exists.
/**
name = the name of the inner member.
- tpseq = a Boost PP sequence which has the function template parameters.
- Each part of the template parameters separated by a comma ( , )
- is put in a separate sequence element.
-
returns = a metafunction called "boost::tti::has_member_function_template_name" where 'name' is the macro parameter.
The metafunction types and return:
@@ -136,24 +124,19 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE(name,tpseq) \
+#define BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE(name) \
BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE \
( \
BOOST_PP_CAT(has_member_function_template_,name), \
- name, \
- tpseq \
+ name \
) \
/**/
-/// Expands to a metafunction class which tests whether a member function template with a particular name and signature exists.
+/// Expands to a metafunction class which tests whether a member function template with a particular name exists.
/**
name = the name of the inner member.
- tpseq = a Boost PP sequence which has the function template parameters.
- Each part of the template parameters separated by a comma ( , )
- is put in a separate sequence element.
-
returns = a metafunction class called "boost::tti::mtfc_has_member_function_template_name" where 'name' is the macro parameter.
The metafunction class's 'apply' metafunction types and return:
@@ -170,12 +153,11 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE(name,tpseq) \
+#define BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE(name) \
BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE \
( \
BOOST_PP_CAT(mtfc_has_member_function_template_,name), \
- name, \
- tpseq \
+ name \
) \
/**/
Added: sandbox/tti/boost/tti/mem_fun_template_params.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/mem_fun_template_params.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,185 @@
+#if !defined(TTI_MEMBER_FUNCTION_TEMPLATE_PARAMS_HPP)
+#define TTI_MEMBER_FUNCTION_TEMPLATE_PARAMS_HPP
+
+#include <boost/config.hpp>
+#include <boost/function_types/property_tags.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/to_tuple.hpp>
+#include <boost/preprocessor/tuple/to_list.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include "mf_mem_fun_template.hpp"
+#include "detail/dmem_fun_template.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a member function template with a particular name and signature exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the enclosing type in which to look for our 'name'.
+
+ R = the return type of a valid instantiation of the member function template.
+
+ FS = an optional parameter which are the parameters of a valid instantiation of the member function template, in the form of a boost::mpl forward sequence.
+
+ TAG = an optional parameter which is a boost::function_types tag to apply to a valid instantiation of the member function template.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(tpseq),BOOST_PP_SEQ_TO_TUPLE(tpseq))) \
+ } \
+ template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
+ struct trait : \
+ detail::trait<typename detail::ptmf_seq<T,R,FS,TAG>::type,typename boost::remove_const<T>::type> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a member function template with a particular name and signature exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type in which to look for our 'name'.
+
+ R = the return type of a valid instantiation of the member function template.
+
+ FS = an optional parameter which are the parameters of a valid instantiation of the member function template, in the form of a boost::mpl forward sequence.
+
+ TAG = an optional parameter which is a boost::function_types tag to apply to a valid instantiation of the member function template.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(tpseq),BOOST_PP_SEQ_TO_TUPLE(tpseq))) \
+ } \
+ struct trait \
+ { \
+ template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
+ struct apply : \
+ detail::trait<typename detail::ptmf_seq<T,R,FS,TAG>::type,typename boost::remove_const<T>::type> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction which tests whether a member function templaten with a particular name and signature exists.
+/**
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction called "boost::tti::has_member_function_template_name" where 'name' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the enclosing type in which to look for our 'name'.
+
+ R = the return type of a valid instantiation of the member function template.
+
+ FS = an optional parameter which are the parameters of a valid instantiation of the member function template, in the form of a boost::mpl forward sequence.
+
+ TAG = an optional parameter which is a boost::function_types tag to apply to a valid instantiation of the member function template.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(name,tpseq) \
+ BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS \
+ ( \
+ BOOST_PP_CAT(has_member_function_template_,name), \
+ name, \
+ tpseq \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a member function template with a particular name and signature exists.
+/**
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_member_function_template_name" where 'name' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type in which to look for our 'name'.
+
+ R = the return type of a valid instantiation of the member function template.
+
+ FS = an optional parameter which are the parameters of a valid instantiation of the member function template, in the form of a boost::mpl forward sequence.
+
+ TAG = an optional parameter which is a boost::function_types tag to apply to a valid instantiation of the member function template.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(name,tpseq) \
+ BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS \
+ ( \
+ BOOST_PP_CAT(mtfc_has_member_function_template_,name), \
+ name, \
+ tpseq \
+ ) \
+/**/
+
+#endif // TTI_MEMBER_FUNCTION_TEMPLATE_PARAMS_HPP
Added: sandbox/tti/boost/tti/static_mem_data.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/static_mem_data.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,202 @@
+#if !defined(TTI_STATIC_MEMBER_DATA_HPP)
+#define TTI_STATIC_MEMBER_DATA_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include "detail/dstatic_mem_data.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a static member data with a particular name and type exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ name = the name of the inner member.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member data type,
+ in the form of a data type,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+ } \
+ template<class T,class Type> \
+ struct trait : \
+ detail::trait<T,Type> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member data with a particular name and type exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ name = the name of the inner member.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member data type,
+ in the form of a data type,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_MTFC_TRAIT_HAS_STATIC_MEMBER_DATA(trait,name) \
+ } \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply : \
+ detail::trait::apply<T,Type> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+
+/// Expands to a metafunction which tests whether a static member data with a particular name and type exists.
+/**
+
+ name = the name of the inner member.
+
+ returns = a metafunction called "boost::tti::has_static_member_name" where 'name' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member data type,
+ in the form of a data type,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_HAS_STATIC_MEMBER_DATA(name) \
+ BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_DATA \
+ ( \
+ BOOST_PP_CAT(has_static_member_data_,name), \
+ name \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member data with a particular name and type exists.
+/**
+
+ name = the name of the inner member.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_static_member_data_name" where 'name' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member data type,
+ in the form of a data type,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_HAS_STATIC_MEMBER_DATA(name) \
+ BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_DATA \
+ ( \
+ BOOST_PP_CAT(mtfc_has_static_member_data_,name), \
+ name \
+ ) \
+/**/
+
+namespace boost
+ {
+ namespace tti
+ {
+
+ /// A metafunction which checks whether a static member data exists within an enclosing type.
+ /**
+
+ This metafunction takes its specific types as nullary metafunctions whose typedef 'type' member is the actual type used.
+
+ The metafunction types and return:
+
+ HasStaticMemberData = a Boost MPL lambda expression using the metafunction generated from the TTI_HAS_STATIC_MEMBER_DATA ( or TTI_TRAIT_HAS_STATIC_MEMBER_DATA ) macro.<br />
+ The easiest way to generate the lambda expression is to use a Boost MPL placeholder expression of the form 'metafunction\<_,_\>'.
+ You can also use the metafunction class generated by the TTI_MTFC_HAS_STATIC_MEMBER_DATA ( or TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_DATA ) macro.
+
+ T = the enclosing type as a nullary metafunction.
+
+ R = the type of the static member data as a nullary metafunction.
+
+ returns = 'value' is true if the member data exists within the enclosing type,
+ otherwise 'value' is false.
+
+ */
+ template
+ <
+ class HasStaticMemberData,
+ class T,
+ class R
+ >
+ struct mf_has_static_member_data :
+ boost::mpl::apply
+ <
+ HasStaticMemberData,
+ typename T::type,
+ typename R::type
+ >::type
+ {
+ };
+ }
+ }
+
+#endif // TTI_STATIC_MEMBER_DATA_HPP
Modified: sandbox/tti/boost/tti/static_mem_fun.hpp
==============================================================================
--- sandbox/tti/boost/tti/static_mem_fun.hpp (original)
+++ sandbox/tti/boost/tti/static_mem_fun.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -10,6 +10,7 @@
#include <boost/mpl/vector.hpp>
#include <boost/preprocessor/cat.hpp>
#include "detail/dstatic_mem_fun.hpp"
+#include "detail/dtfunction.hpp"
#include "detail/dtself.hpp"
/*
Modified: sandbox/tti/boost/tti/static_mem_fun_template.hpp
==============================================================================
--- sandbox/tti/boost/tti/static_mem_fun_template.hpp (original)
+++ sandbox/tti/boost/tti/static_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -7,6 +7,7 @@
#include <boost/preprocessor/cat.hpp>
#include "mf_static_mem_fun_template.hpp"
#include "detail/dstatic_mem_fun_template.hpp"
+#include "detail/dtfunction.hpp"
/*
@@ -17,17 +18,13 @@
/** \file
*/
-/// Expands to a metafunction which tests whether a static member function template with a particular name and signature exists.
+/// Expands to a metafunction which tests whether a static member function template with a particular name exists.
/**
trait = the name of the metafunction within the tti namespace.
name = the name of the inner member.
- tpseq = a Boost PP sequence which has the function template parameters.
- Each part of the template parameters separated by a comma ( , )
- is put in a separate sequence element.
-
returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
The metafunction types and return:
@@ -44,14 +41,14 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+#define BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name) \
namespace boost \
{ \
namespace tti \
{ \
namespace detail \
{ \
- TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+ TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_NIL) \
} \
template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
struct trait : \
@@ -62,17 +59,13 @@
} \
/**/
-/// Expands to a metafunction class which tests whether a static member function template with a particular name and signature exists.
+/// Expands to a metafunction class which tests whether a static member function template with a particular name exists.
/**
trait = the name of the metafunction class within the tti namespace.
name = the name of the inner member.
- tpseq = a Boost PP sequence which has the function template parameters.
- Each part of the template parameters separated by a comma ( , )
- is put in a separate sequence element.
-
returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.<br />
The metafunction class's 'apply' metafunction types and return:
@@ -89,14 +82,14 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+#define BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name) \
namespace boost \
{ \
namespace tti \
{ \
namespace detail \
{ \
- TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,tpseq) \
+ TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_NIL) \
} \
struct trait \
{ \
@@ -110,15 +103,11 @@
} \
/**/
-/// Expands to a metafunction which tests whether a static member function template with a particular name and signature exists.
+/// Expands to a metafunction which tests whether a static member function template with a particular name exists.
/**
name = the name of the inner member.
- tpseq = a Boost PP sequence which has the function template parameters.
- Each part of the template parameters separated by a comma ( , )
- is put in a separate sequence element.
-
returns = a metafunction called "boost::tti::has_static_member_function_name" where 'name' is the macro parameter.
The metafunction types and return:
@@ -135,24 +124,19 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(name,tpseq) \
+#define BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(name) \
BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE \
( \
BOOST_PP_CAT(has_static_member_function_template_,name), \
- name, \
- tpseq \
+ name \
) \
/**/
-/// Expands to a metafunction class which tests whether a static member function template with a particular name and signature exists.
+/// Expands to a metafunction class which tests whether a static member function template with a particular name exists.
/**
name = the name of the inner member.
- tpseq = a Boost PP sequence which has the function template parameters.
- Each part of the template parameters separated by a comma ( , )
- is put in a separate sequence element.
-
returns = a metafunction class called "boost::tti::mtfc_has_static_member_function_name" where 'name' is the macro parameter.
The metafunction class's 'apply' metafunction types and return:
@@ -169,12 +153,11 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(name,tpseq) \
+#define BOOST_TTI_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(name) \
BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE \
( \
BOOST_PP_CAT(mtfc_has_static_member_function_template_,name), \
- name, \
- tpseq \
+ name \
) \
/**/
Added: sandbox/tti/boost/tti/static_mem_fun_template_params.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/static_mem_fun_template_params.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,185 @@
+#if !defined(TTI_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP)
+#define TTI_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP
+
+#include <boost/config.hpp>
+#include <boost/function_types/property_tags.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/to_tuple.hpp>
+#include <boost/preprocessor/tuple/to_list.hpp>
+#include "mf_static_mem_fun_template.hpp"
+#include "detail/dstatic_mem_fun_template.hpp"
+#include "detail/dtfunction.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a static member function template with a particular name and signature exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the enclosing type in which to look for our 'name'.
+
+ R = the return type of the static member function.
+
+ FS = an optional parameter which are the parameters of the static member function as a boost::mpl forward sequence.
+
+ TAG = an optional parameter which is a boost::function_types tag to apply to the static member function.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(tpseq),BOOST_PP_SEQ_TO_TUPLE(tpseq))) \
+ } \
+ template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
+ struct trait : \
+ detail::trait<T,typename detail::tfunction_seq<R,FS,TAG>::type> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member function template with a particular name and signature exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type in which to look for our 'name'.
+
+ R = the return type of the static member function.
+
+ FS = an optional parameter which are the parameters of the static member function as a boost::mpl forward sequence.
+
+ TAG = an optional parameter which is a boost::function_types tag to apply to the static member function.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(trait,name,tpseq) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_PP_TUPLE_TO_LIST(BOOST_PP_SEQ_SIZE(tpseq),BOOST_PP_SEQ_TO_TUPLE(tpseq))) \
+ } \
+ struct trait \
+ { \
+ template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
+ struct apply : \
+ detail::trait<T,typename detail::tfunction_seq<R,FS,TAG>::type> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction which tests whether a static member function template with a particular name and signature exists.
+/**
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction called "boost::tti::has_static_member_function_name" where 'name' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the enclosing type in which to look for our 'name'.
+
+ R = the return type of the static member function.
+
+ FS = an optional parameter which are the parameters of the static member function as a boost::mpl forward sequence.
+
+ TAG = an optional parameter which is a boost::function_types tag to apply to the static member function.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(name,tpseq) \
+ BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS \
+ ( \
+ BOOST_PP_CAT(has_static_member_function_template_,name), \
+ name, \
+ tpseq \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member function template with a particular name and signature exists.
+/**
+
+ name = the name of the inner member.
+
+ tpseq = a Boost PP sequence which has the function template parameters.
+ Each part of the template parameters separated by a comma ( , )
+ is put in a separate sequence element.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_static_member_function_name" where 'name' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type in which to look for our 'name'.
+
+ R = the return type of the static member function.
+
+ FS = an optional parameter which are the parameters of the static member function as a boost::mpl forward sequence.
+
+ TAG = an optional parameter which is a boost::function_types tag to apply to the static member function.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(name,tpseq) \
+ BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS \
+ ( \
+ BOOST_PP_CAT(mtfc_has_static_member_function_template_,name), \
+ name, \
+ tpseq \
+ ) \
+/**/
+
+#endif // TTI_STATIC_MEM_FUN_TEMPLATE_PARAMS_HPP
Modified: sandbox/tti/boost/tti/static_member.hpp
==============================================================================
--- sandbox/tti/boost/tti/static_member.hpp (original)
+++ sandbox/tti/boost/tti/static_member.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -4,7 +4,6 @@
#include <boost/config.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/identity.hpp>
-#include <boost/mpl/placeholders.hpp>
#include <boost/preprocessor/cat.hpp>
#include "detail/dstatic_mem.hpp"
@@ -17,7 +16,7 @@
/** \file
*/
-/// Expands to a metafunction which tests whether a static member data or a static member function with a particular name and type exists.
+/// Expands to a metafunction which tests whether a static member function with a particular name and composite type exists.
/**
trait = the name of the metafunction within the tti namespace.
@@ -30,8 +29,8 @@
T = the enclosing type.
- Type = the static member data or static member function type,
- in the form of a data or function type,
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
in which to look for our 'name'.
returns = 'value' is true if the 'name' exists within the enclosing type,
@@ -57,7 +56,7 @@
} \
/**/
-/// Expands to a metafunction class which tests whether a static member data or a static member function with a particular name and type exists.
+/// Expands to a metafunction class which tests whether a static member function with a particular name and composite type exists.
/**
trait = the name of the metafunction class within the tti namespace.
@@ -70,8 +69,8 @@
T = the enclosing type.
- Type = the static member data or static member function type,
- in the form of a data or function type,
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
in which to look for our 'name'.
returns = 'value' is true if the 'name' exists within the enclosing type,
@@ -101,7 +100,7 @@
/**/
-/// Expands to a metafunction which tests whether a static member data or a static member function with a particular name and type exists.
+/// Expands to a metafunction which tests whether a static member function with a particular name and composite type exists.
/**
name = the name of the inner member.
@@ -112,8 +111,8 @@
T = the enclosing type.
- Type = the static member data or static member function type,
- in the form of a data or function type,
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
in which to look for our 'name'.
returns = 'value' is true if the 'name' exists within the enclosing type,
@@ -129,7 +128,7 @@
) \
/**/
-/// Expands to a metafunction class which tests whether a static member data or a static member function with a particular name and type exists.
+/// Expands to a metafunction class which tests whether a static member function with a particular name and composite type exists.
/**
name = the name of the inner member.
@@ -140,8 +139,8 @@
T = the enclosing type.
- Type = the static member data or static member function type,
- in the form of a data or function type,
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
in which to look for our 'name'.
returns = 'value' is true if the 'name' exists within the enclosing type,
@@ -157,46 +156,4 @@
) \
/**/
-namespace boost
- {
- namespace tti
- {
-
- /// A metafunction which checks whether a static member data exists within an enclosing type.
- /**
-
- This metafunction takes its specific types as nullary metafunctions whose typedef 'type' member is the actual type used.
-
- The metafunction types and return:
-
- HasStaticMember = a Boost MPL lambda expression using the metafunction generated from the TTI_HAS_STATIC_MEMBER ( or TTI_TRAIT_HAS_STATIC_MEMBER ) macro.<br />
- The easiest way to generate the lambda expression is to use a Boost MPL placeholder expression of the form 'metafunction\<_,_\>'.
- You can also use the metafunction class generated by the TTI_MTFC_HAS_STATIC_MEMBER ( or TTI_MTFC_TRAIT_HAS_STATIC_MEMBER ) macro.
-
- T = the enclosing type as a nullary metafunction.
-
- R = the type of the static member data as a nullary metafunction.
-
- returns = 'value' is true if the member data exists within the enclosing type,
- otherwise 'value' is false.
-
- */
- template
- <
- class HasStaticMember,
- class T,
- class R
- >
- struct mf_has_static_data :
- boost::mpl::apply
- <
- HasStaticMember,
- typename T::type,
- typename R::type
- >::type
- {
- };
- }
- }
-
#endif // TTI_STATIC_MEMBER_HPP
Modified: sandbox/tti/boost/tti/tti.hpp
==============================================================================
--- sandbox/tti/boost/tti/tti.hpp (original)
+++ sandbox/tti/boost/tti/tti.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -6,11 +6,13 @@
#include "template.hpp"
#include "template_params.hpp"
#include "member.hpp"
-#include "mem_fun.hpp"
#include "mem_data.hpp"
+#include "mem_fun.hpp"
+#include "mem_fun_template.hpp"
+#include "mem_fun_template_params.hpp"
#include "static_member.hpp"
#include "static_mem_fun.hpp"
-#include "mem_fun_template.hpp"
#include "static_mem_fun_template.hpp"
+#include "static_mem_fun_template_params.hpp"
#endif // TT_INTROSPECTION_HPP
Added: sandbox/tti/boost/tti/vm_comp_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/vm_comp_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,184 @@
+#if !defined(TTI_VM_COMP_MEM_FUN_TEMPLATE_HPP)
+#define TTI_VM_COMP_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/list/adt.hpp>
+#include <boost/variadic_macro_data/vmd.hpp>
+#include "detail/dcomp_mem_fun_template.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a member function template with a particular name and an optional signature exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ ... = variadic macro data which has the name and optionally the function template parameters.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_VM_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,...) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ trait, \
+ BOOST_VMD_DATA_ELEM(0,__VA_ARGS__), \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL \
+ ( \
+ BOOST_VMD_DATA_SIZE(__VA_ARGS__), \
+ 1 \
+ ), \
+ BOOST_PP_NIL, \
+ BOOST_PP_LIST_REST \
+ ( \
+ BOOST_VMD_DATA_TO_PP_LIST(__VA_ARGS__) \
+ ) \
+ ) \
+ ) \
+ } \
+ template<class T> \
+ struct trait : \
+ detail::trait<T> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a member function template with a particular name and an optional signature exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ ... = variadic macro data which has the name and optionally the function template parameters.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_VM_MTFC_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(trait,...) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ trait, \
+ BOOST_VMD_DATA_ELEM(0,__VA_ARGS__), \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL \
+ ( \
+ BOOST_VMD_DATA_SIZE(__VA_ARGS__), \
+ 1 \
+ ), \
+ BOOST_PP_NIL, \
+ BOOST_PP_LIST_REST \
+ ( \
+ BOOST_VMD_DATA_TO_PP_LIST(__VA_ARGS__) \
+ ) \
+ ) \
+ ) \
+ } \
+ struct trait \
+ { \
+ template<class T> \
+ struct apply : \
+ detail::trait<T> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction which tests whether a member function template with a particular name and an optional signature exists.
+/**
+
+ ... = variadic macro data which has the name and optionally the function template parameters.
+
+ returns = a metafunction called "boost::tti::has_comp_member_function_template_name" where 'name' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_VM_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(...) \
+ BOOST_TTI_VM_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ BOOST_PP_CAT(has_comp_member_function_template_,BOOST_VMD_DATA_ELEM(0,__VA_ARGS__)), \
+ __VA_ARGS__ \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a member function template with a particular name and an optional signature exists.
+/**
+
+ ... = variadic macro data which has the name and optionally the function template parameters.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_comp_member_function_template_name" where 'name' is the macro parameter.
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the type, in the form of a member function pointer,
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists, with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_VM_MTFC_HAS_COMP_MEMBER_FUNCTION_TEMPLATE(...) \
+ BOOST_TTI_VM_MTFC_TRAIT_HAS_COMP_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ BOOST_PP_CAT(mtfc_has_comp_member_function_template_,BOOST_VMD_DATA_ELEM(0,__VA_ARGS__)), \
+ __VA_ARGS__ \
+ ) \
+/**/
+
+#endif // !defined(BOOST_NO_VARIADIC_MACROS)
+#endif // TTI_VM_COMP_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/boost/tti/vm_comp_static_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/vm_comp_static_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,201 @@
+#if !defined(TTI_VM_COMP_STATIC_MEM_FUN_TEMPLATE_HPP)
+#define TTI_VM_COMP_STATIC_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/list/adt.hpp>
+#include <boost/variadic_macro_data/vmd.hpp>
+#include "detail/dcomp_static_mem_fun_template.hpp"
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+/// Expands to a metafunction which tests whether a static member function template with a particular name/optional signature and composite type exists.
+/**
+
+ trait = the name of the metafunction within the tti namespace.
+
+ ... = variadic macro data which has the name and optionally the function template parameters.
+
+ returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.
+
+ The metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_VM_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,...) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ trait, \
+ BOOST_VMD_DATA_ELEM(0,__VA_ARGS__), \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL \
+ ( \
+ BOOST_VMD_DATA_SIZE(__VA_ARGS__), \
+ 1 \
+ ), \
+ BOOST_PP_NIL, \
+ BOOST_PP_LIST_REST \
+ ( \
+ BOOST_VMD_DATA_TO_PP_LIST(__VA_ARGS__) \
+ ) \
+ ) \
+ ) \
+ } \
+ template<class T,class Type> \
+ struct trait : \
+ detail::trait<T,Type> \
+ { \
+ }; \
+ } \
+ } \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member function template with a particular name/optional signature and composite type exists.
+/**
+
+ trait = the name of the metafunction class within the tti namespace.
+
+ ... = variadic macro data which has the name and optionally the function template parameters.
+
+ returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_VM_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,...) \
+namespace boost \
+ { \
+ namespace tti \
+ { \
+ namespace detail \
+ { \
+ TTI_DETAIL_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ trait, \
+ BOOST_VMD_DATA_ELEM(0,__VA_ARGS__), \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL \
+ ( \
+ BOOST_VMD_DATA_SIZE(__VA_ARGS__), \
+ 1 \
+ ), \
+ BOOST_PP_NIL, \
+ BOOST_PP_LIST_REST \
+ ( \
+ BOOST_VMD_DATA_TO_PP_LIST(__VA_ARGS__) \
+ ) \
+ ) \
+ ) \
+ } \
+ struct trait \
+ { \
+ template<class T,class Type> \
+ struct apply : \
+ detail::trait::apply<T,Type> \
+ { \
+ }; \
+ }; \
+ } \
+ } \
+/**/
+
+
+/// Expands to a metafunction which tests whether a static member function template with a particular name/optional signature and composite type exists.
+/**
+
+ ... = variadic macro data which has the name and optionally the function template parameters.
+
+ returns = a metafunction called "boost::tti::has_comp_static_member_function_template_name" where 'name' is the macro parameter.<br />
+
+ The metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_VM_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(...) \
+ BOOST_TTI_VM_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ BOOST_PP_CAT(has_comp_static_member_function_template_,BOOST_VMD_DATA_ELEM(0,__VA_ARGS__)), \
+ __VA_ARGS__ \
+ ) \
+/**/
+
+/// Expands to a metafunction class which tests whether a static member function template with a particular name/optional signature and composite type exists.
+/**
+
+ ... = variadic macro data which has the name and optionally the function template parameters.
+
+ returns = a metafunction class called "boost::tti::mtfc_has_comp_static_member_function_template_name" where 'name' is the macro parameter.<br />
+
+ The metafunction class's 'apply' metafunction types and return:
+
+ T = the enclosing type.
+
+ Type = the static member function type,
+ in the form of a composite function type - 'return_type (parameter_types...)',
+ in which to look for our 'name'.
+
+ returns = 'value' is true if the 'name' exists within the enclosing type,
+ with the appropriate type,
+ otherwise 'value' is false.
+
+*/
+#define BOOST_TTI_VM_MTFC_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE(...) \
+ BOOST_TTI_VM_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ BOOST_PP_CAT(mtfc_has_comp_static_member_function_template_,BOOST_VMD_DATA_ELEM(0,__VA_ARGS__)), \
+ __VA_ARGS__ \
+ ) \
+/**/
+
+#endif // !defined(BOOST_NO_VARIADIC_MACROS)
+#endif // TTI_VM_COMP_STATIC_MEM_FUN_TEMPLATE_HPP
Modified: sandbox/tti/boost/tti/vm_mem_fun_template.hpp
==============================================================================
--- sandbox/tti/boost/tti/vm_mem_fun_template.hpp (original)
+++ sandbox/tti/boost/tti/vm_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -1,5 +1,5 @@
-#if !defined(TTI_VM_MEMBER_FUNCTION_TEMPLATE_HPP)
-#define TTI_VM_MEMBER_FUNCTION_TEMPLATE_HPP
+#if !defined(TTI_VM_MEM_FUN_TEMPLATE_HPP)
+#define TTI_VM_MEM_FUN_TEMPLATE_HPP
#include <boost/config.hpp>
@@ -8,6 +8,9 @@
#include <boost/function_types/property_tags.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/list/adt.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/variadic_macro_data/vmd.hpp>
#include "mf_mem_fun_template.hpp"
@@ -22,14 +25,12 @@
/** \file
*/
-/// Expands to a metafunction which tests whether a member function template with a particular name and signature exists.
+/// Expands to a metafunction which tests whether a member function template with a particular name and an optional signature exists.
/**
trait = the name of the metafunction within the tti namespace.
- name = the name of the inner member.
-
- ... = variadic macro data which has the function template parameters.
+ ... = variadic macro data which has the name and optionally the function template parameters.
returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
@@ -47,14 +48,31 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,...) \
+#define BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,...) \
namespace boost \
{ \
namespace tti \
{ \
namespace detail \
{ \
- TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_VMD_DATA_TO_PP_SEQ(__VA_ARGS__)) \
+ TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ trait, \
+ BOOST_VMD_DATA_ELEM(0,__VA_ARGS__), \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL \
+ ( \
+ BOOST_VMD_DATA_SIZE(__VA_ARGS__), \
+ 1 \
+ ), \
+ BOOST_PP_NIL, \
+ BOOST_PP_LIST_REST \
+ ( \
+ BOOST_VMD_DATA_TO_PP_LIST(__VA_ARGS__) \
+ ) \
+ ) \
+ ) \
} \
template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
struct trait : \
@@ -65,14 +83,12 @@
} \
/**/
-/// Expands to a metafunction class which tests whether a member function template with a particular name and signature exists.
+/// Expands to a metafunction class which tests whether a member function template with a particular name and an optional signature exists.
/**
trait = the name of the metafunction class within the tti namespace.
- name = the name of the inner member.
-
- ... = variadic macro data which has the function template parameters.
+ ... = variadic macro data which has the name and optionally the function template parameters.
returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.
@@ -90,14 +106,31 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_VM_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,...) \
+#define BOOST_TTI_VM_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,...) \
namespace boost \
{ \
namespace tti \
{ \
namespace detail \
{ \
- TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_VMD_DATA_TO_PP_SEQ(__VA_ARGS__)) \
+ TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ trait, \
+ BOOST_VMD_DATA_ELEM(0,__VA_ARGS__), \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL \
+ ( \
+ BOOST_VMD_DATA_SIZE(__VA_ARGS__), \
+ 1 \
+ ), \
+ BOOST_PP_NIL, \
+ BOOST_PP_LIST_REST \
+ ( \
+ BOOST_VMD_DATA_TO_PP_LIST(__VA_ARGS__) \
+ ) \
+ ) \
+ ) \
} \
struct trait \
{ \
@@ -111,14 +144,12 @@
} \
/**/
-/// Expands to a metafunction which tests whether a member function templaten with a particular name and signature exists.
+/// Expands to a metafunction which tests whether a member function templaten with a particular name and an optional signature exists.
/**
- name = the name of the inner member.
-
- ... = variadic macro data which has the function template parameters.
+ ... = variadic macro data which has the name and optionally the function template parameters.
- returns = a metafunction called "boost::tti::has_member_function_template_name" where 'name' is the macro parameter.
+ returns = a metafunction called "boost::tti::has_member_function_template_name" where 'name' is the first variadic macro parameter.
The metafunction types and return:
@@ -134,23 +165,20 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_VM_HAS_MEMBER_FUNCTION_TEMPLATE(name,...) \
+#define BOOST_TTI_VM_HAS_MEMBER_FUNCTION_TEMPLATE(...) \
BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE \
( \
- BOOST_PP_CAT(has_member_function_template_,name), \
- name, \
+ BOOST_PP_CAT(has_member_function_template_,BOOST_VMD_DATA_ELEM(0,__VA_ARGS__)), \
__VA_ARGS__ \
) \
/**/
-/// Expands to a metafunction class which tests whether a member function template with a particular name and signature exists.
+/// Expands to a metafunction class which tests whether a member function template with a particular name and an optional signature exists.
/**
- name = the name of the inner member.
-
- ... = variadic macro data which has the function template parameters.
+ ... = variadic macro data which has the name and optionally the function template parameters.
- returns = a metafunction class called "boost::tti::mtfc_has_member_function_template_name" where 'name' is the macro parameter.
+ returns = a metafunction class called "boost::tti::mtfc_has_member_function_template_name" where 'name' is the first variadic macro parameter.
The metafunction class's 'apply' metafunction types and return:
@@ -166,14 +194,13 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_VM_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE(name,...) \
+#define BOOST_TTI_VM_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE(...) \
BOOST_TTI_VM_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE \
( \
- BOOST_PP_CAT(mtfc_has_member_function_template_,name), \
- name, \
+ BOOST_PP_CAT(mtfc_has_member_function_template_,BOOST_VMD_DATA_ELEM(0,__VA_ARGS__)), \
__VA_ARGS__ \
) \
/**/
#endif // !defined(BOOST_NO_VARIADIC_MACROS)
-#endif // TTI_VM_MEMBER_FUNCTION_TEMPLATE_HPP
+#endif // TTI_VM_MEM_FUN_TEMPLATE_HPP
Modified: sandbox/tti/boost/tti/vm_static_mem_fun_template.hpp
==============================================================================
--- sandbox/tti/boost/tti/vm_static_mem_fun_template.hpp (original)
+++ sandbox/tti/boost/tti/vm_static_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -8,9 +8,13 @@
#include <boost/function_types/property_tags.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/list/adt.hpp>
#include <boost/variadic_macro_data/vmd.hpp>
#include "mf_static_mem_fun_template.hpp"
#include "detail/dstatic_mem_fun_template.hpp"
+#include "detail/dtfunction.hpp"
/*
@@ -21,14 +25,12 @@
/** \file
*/
-/// Expands to a metafunction which tests whether a static member function template with a particular name and signature exists.
+/// Expands to a metafunction which tests whether a static member function template with a particular name and an optional signature exists.
/**
trait = the name of the metafunction within the tti namespace.
- name = the name of the inner member.
-
- ... = variadic macro data which has the function template parameters.
+ ... = variadic macro data which has the name and optionally the function template parameters.
returns = a metafunction called "boost::tti::trait" where 'trait' is the macro parameter.<br />
@@ -46,14 +48,31 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_VM_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,...) \
+#define BOOST_TTI_VM_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,...) \
namespace boost \
{ \
namespace tti \
{ \
namespace detail \
{ \
- TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_VMD_DATA_TO_PP_SEQ(__VA_ARGS__)) \
+ TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ trait, \
+ BOOST_VMD_DATA_ELEM(0,__VA_ARGS__), \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL \
+ ( \
+ BOOST_VMD_DATA_SIZE(__VA_ARGS__), \
+ 1 \
+ ), \
+ BOOST_PP_NIL, \
+ BOOST_PP_LIST_REST \
+ ( \
+ BOOST_VMD_DATA_TO_PP_LIST(__VA_ARGS__) \
+ ) \
+ ) \
+ ) \
} \
template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
struct trait : \
@@ -64,14 +83,12 @@
} \
/**/
-/// Expands to a metafunction class which tests whether a static member function template with a particular name and signature exists.
+/// Expands to a metafunction class which tests whether a static member function template with a particular name and an optional signature exists.
/**
trait = the name of the metafunction class within the tti namespace.
- name = the name of the inner member.
-
- ... = variadic macro data which has the function template parameters.
+ ... = variadic macro data which has the name and optionally the function template parameters.
returns = a metafunction class called "boost::tti::trait" where 'trait' is the macro parameter.<br />
@@ -89,14 +106,31 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_VM_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,...) \
+#define BOOST_TTI_VM_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,...) \
namespace boost \
{ \
namespace tti \
{ \
namespace detail \
{ \
- TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,BOOST_VMD_DATA_TO_PP_SEQ(__VA_ARGS__)) \
+ TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE \
+ ( \
+ trait, \
+ BOOST_VMD_DATA_ELEM(0,__VA_ARGS__), \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL \
+ ( \
+ BOOST_VMD_DATA_SIZE(__VA_ARGS__), \
+ 1 \
+ ), \
+ BOOST_PP_NIL, \
+ BOOST_PP_LIST_REST \
+ ( \
+ BOOST_VMD_DATA_TO_PP_LIST(__VA_ARGS__) \
+ ) \
+ ) \
+ ) \
} \
struct trait \
{ \
@@ -110,14 +144,12 @@
} \
/**/
-/// Expands to a metafunction which tests whether a static member function template with a particular name and signature exists.
+/// Expands to a metafunction which tests whether a static member function template with a particular name and an optional signature exists.
/**
- name = the name of the inner member.
-
- ... = variadic macro data which has the function template parameters.
+ ... = variadic macro data which has the name and optionally the function template parameters.
- returns = a metafunction called "boost::tti::has_static_member_function_name" where 'name' is the macro parameter.
+ returns = a metafunction called "boost::tti::has_static_member_function_template_name" where 'name' is the first variadic macro parameter.
The metafunction types and return:
@@ -133,23 +165,20 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_VM_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(name,...) \
+#define BOOST_TTI_VM_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(...) \
BOOST_TTI_VM_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE \
( \
- BOOST_PP_CAT(has_static_member_function_template_,name), \
- name, \
+ BOOST_PP_CAT(has_static_member_function_template_,BOOST_VMD_DATA_ELEM(0,__VA_ARGS__)), \
__VA_ARGS__ \
) \
/**/
-/// Expands to a metafunction class which tests whether a static member function template with a particular name and signature exists.
+/// Expands to a metafunction class which tests whether a static member function template with a particular name and an optional signature exists.
/**
- name = the name of the inner member.
-
- ... = variadic macro data which has the function template parameters.
+ ... = variadic macro data which has the name and optionally the function template parameters.
- returns = a metafunction class called "boost::tti::mtfc_has_static_member_function_name" where 'name' is the macro parameter.
+ returns = a metafunction class called "boost::tti::mtfc_has_static_member_function_template_name" where 'name' is the first variadic macro parameter.
The metafunction class's 'apply' metafunction types and return:
@@ -165,11 +194,10 @@
otherwise 'value' is false.
*/
-#define BOOST_TTI_VM_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(name,...) \
+#define BOOST_TTI_VM_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(...) \
BOOST_TTI_VM_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE \
( \
- BOOST_PP_CAT(mtfc_has_static_member_function_template_,name), \
- name, \
+ BOOST_PP_CAT(mtfc_has_static_member_function_template_,BOOST_VMD_DATA_ELEM(0,__VA_ARGS__)), \
__VA_ARGS__ \
) \
/**/
Modified: sandbox/tti/libs/tti/doc/build.txt
==============================================================================
--- sandbox/tti/libs/tti/doc/build.txt (original)
+++ sandbox/tti/libs/tti/doc/build.txt 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -13,7 +13,7 @@
When running the tests you can use either of
two targets if you like. The 'tti' target runs all
the tests except for those involving variadic macro
-support in the library. The 'ttiVM' target runs
+support in the library. The 'ttivm' target runs
the tests involving variadic macro support in the
library. If you do not specify a target all tests
are run.
Modified: sandbox/tti/libs/tti/doc/tti_history.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/tti_history.qbk (original)
+++ sandbox/tti/libs/tti/doc/tti_history.qbk 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -2,8 +2,12 @@
[heading Version 1.4]
+* Breaking changes
+ * BOOST_TTI_HAS_STATIC_MEMBER and family supports only composite static member functions.
+ * BOOST_TTI_HAS_MEMBER and family supports only composite member functions.
+* Added BOOST_TTI_HAS_STATIC_MEMBER_DATA and family for introspecting static member data.
* Inclusion of specific header files for faster compilation is now supported.
-* Shorten the names of the test files and test header files to conform to Boost specifications.
+* Shorten the names of the test files and test header files.
* Added support for introspecting function templates.
[heading Version 1.3]
Modified: sandbox/tti/libs/tti/doc/tti_tests.qbk
==============================================================================
--- sandbox/tti/libs/tti/doc/tti_tests.qbk (original)
+++ sandbox/tti/libs/tti/doc/tti_tests.qbk 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -12,7 +12,7 @@
the 'tti' target when executing the jamfile, and therefore
you would not need the variadic\_macro\_data library. If you
just want to run the tests for the variadic macro portion
-of TTI, specify the target as 'ttiVM'.
+of TTI, specify the target as 'ttivm'.
The TTI library has been tested with VC++ 8, 9, 10 and with
gcc 3.4.2, 3.4.5, 4.3.0, 4.4.0, 4.5.0-1, and 4.5.2-1.
Modified: sandbox/tti/libs/tti/test/Jamfile.v2
==============================================================================
--- sandbox/tti/libs/tti/test/Jamfile.v2 (original)
+++ sandbox/tti/libs/tti/test/Jamfile.v2 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -37,17 +37,29 @@
[ compile test_has_mem_fun_compile.cpp ]
[ compile-fail test_has_mem_fun_fail.cpp ]
[ compile-fail test_has_mem_fun_fail2.cpp ]
+ [ run test_has_mem_fun_template.cpp ]
+ [ compile test_has_mem_fun_template_compile.cpp ]
+ [ compile-fail test_has_mem_fun_template_fail.cpp ]
+ [ compile-fail test_has_mem_fun_template_fail2.cpp ]
[ run test_has_static_member.cpp ]
[ compile test_has_static_member_compile.cpp ]
[ compile-fail test_has_static_member_fail.cpp ]
[ compile-fail test_has_static_member_fail2.cpp ]
[ compile-fail test_has_static_member_fail3.cpp ]
[ compile-fail test_has_static_member_fail4.cpp ]
- [ compile-fail test_has_static_member_fail5.cpp ]
+ [ run test_has_static_mem_data.cpp ]
+ [ compile test_has_static_mem_data_compile.cpp ]
+ [ compile-fail test_has_static_mem_data_fail.cpp ]
+ [ compile-fail test_has_static_mem_data_fail2.cpp ]
+ [ compile-fail test_has_static_mem_data_fail3.cpp ]
[ run test_has_static_mem_fun.cpp ]
[ compile test_has_static_mem_fun_compile.cpp ]
[ compile-fail test_has_static_mem_fun_fail.cpp ]
[ compile-fail test_has_static_mem_fun_fail2.cpp ]
+ [ run test_has_static_mem_fun_template.cpp ]
+ [ compile test_has_static_mem_fun_template_compile.cpp ]
+ [ compile-fail test_has_static_mem_fun_template_fail.cpp ]
+ [ compile-fail test_has_static_mem_fun_template_fail2.cpp ]
[ run test_has_template.cpp ]
[ compile test_has_template_compile.cpp ]
[ compile-fail test_has_template_fail.cpp ]
@@ -84,6 +96,11 @@
[ compile-fail test_mf_has_mem_fun_fail.cpp ]
[ compile-fail test_mf_has_mem_fun_fail2.cpp ]
[ compile-fail test_mf_has_mem_fun_fail3.cpp ]
+ [ run test_mf_has_mem_fun_template.cpp ]
+ [ compile test_mf_has_mem_fun_template_compile.cpp ]
+ [ compile-fail test_mf_has_mem_fun_template_fail.cpp ]
+ [ compile-fail test_mf_has_mem_fun_template_fail2.cpp ]
+ [ compile-fail test_mf_has_mem_fun_template_fail3.cpp ]
[ run test_mf_has_static_data.cpp ]
[ compile test_mf_has_static_data_compile.cpp ]
[ compile-fail test_mf_has_static_data_fail.cpp ]
@@ -94,6 +111,11 @@
[ compile-fail test_mf_has_static_fun_fail.cpp ]
[ compile-fail test_mf_has_static_fun_fail2.cpp ]
[ compile-fail test_mf_has_static_fun_fail3.cpp ]
+ [ run test_mf_has_static_fun_template.cpp ]
+ [ compile test_mf_has_static_fun_template_compile.cpp ]
+ [ compile-fail test_mf_has_static_fun_template_fail.cpp ]
+ [ compile-fail test_mf_has_static_fun_template_fail2.cpp ]
+ [ compile-fail test_mf_has_static_fun_template_fail3.cpp ]
[ run test_mf_has_type.cpp ]
[ compile test_mf_has_type_compile.cpp ]
[ compile-fail test_mf_has_type_fail.cpp ]
@@ -116,9 +138,10 @@
[ compile-fail test_mf_has_template_cp_fail3.cpp ]
[ run test_mf_mem_type.cpp ]
[ compile test_mf_mem_type_compile.cpp ]
+# [ run test_has_fun_template.cpp ]
;
-alias ttiVM
+alias ttivm
:
[ run test_vm_has_template_cp.cpp : : : <include>../../../../variadic_macro_data ]
[ compile test_vm_has_template_cp_compile.cpp : <include>../../../../variadic_macro_data ]
@@ -131,4 +154,22 @@
[ compile-fail test_vm_mf_has_template_cp_fail.cpp : <include>../../../../variadic_macro_data ]
[ compile-fail test_vm_mf_has_template_cp_fail2.cpp : <include>../../../../variadic_macro_data ]
[ compile-fail test_vm_mf_has_template_cp_fail3.cpp : <include>../../../../variadic_macro_data ]
+ [ run test_vm_has_mem_fun_template.cpp : : : <include>../../../../variadic_macro_data ]
+ [ compile test_vm_has_mem_fun_template_compile.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_has_mem_fun_template_fail.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_has_mem_fun_template_fail2.cpp : <include>../../../../variadic_macro_data ]
+ [ run test_vm_has_static_mem_fun_template.cpp : : : <include>../../../../variadic_macro_data ]
+ [ compile test_vm_has_static_mem_fun_template_compile.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_has_static_mem_fun_template_fail.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_has_static_mem_fun_template_fail2.cpp : <include>../../../../variadic_macro_data ]
+ [ run test_vm_mf_has_mem_fun_template.cpp : : : <include>../../../../variadic_macro_data ]
+ [ compile test_vm_mf_has_mem_fun_template_compile.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_mf_has_mem_fun_template_fail.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_mf_has_mem_fun_template_fail2.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_mf_has_mem_fun_template_fail3.cpp : <include>../../../../variadic_macro_data ]
+ [ run test_vm_mf_has_static_fun_template.cpp : : : <include>../../../../variadic_macro_data ]
+ [ compile test_vm_mf_has_static_fun_template_compile.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_mf_has_static_fun_template_fail.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_mf_has_static_fun_template_fail2.cpp : <include>../../../../variadic_macro_data ]
+ [ compile-fail test_vm_mf_has_static_fun_template_fail3.cpp : <include>../../../../variadic_macro_data ]
;
Added: sandbox/tti/libs/tti/test/test_has_mem_fun_template.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_mem_fun_template.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,9 @@
+#include "test_has_mem_fun_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,22 @@
+#if !defined(TEST_HAS_MEM_FUN_TEMPLATE_HPP)
+#define TEST_HAS_MEM_FUN_TEMPLATE_HPP
+
+#include "test_structs.hpp"
+#include <boost/tti/mem_fun_template.hpp>
+#include <boost/tti/mem_fun_template_params.hpp>
+#include <boost/tti/mem_type.hpp>
+
+BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(SomeFuncTemplate,(int)(long)(double)(50))
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(SameName,AFuncTemplate,(int)(int)(float))
+BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(AFuncTemplate,(long)(9983))
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(AnotherName,MyFuncTemplate,(bool))
+
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(SomeFuncName,SomeFuncTemplate)
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(AnotherNameFT,AFuncTemplate)
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(OneFT,AFuncTemplate)
+BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE(MyFuncTemplate)
+
+BOOST_TTI_MEMBER_TYPE(BType)
+BOOST_TTI_MEMBER_TYPE(CType)
+
+#endif // TEST_HAS_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/libs/tti/test/test_has_mem_fun_template_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_mem_fun_template_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,9 @@
+#include "test_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_mem_fun_template_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_mem_fun_template_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Wrong function signature for
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_mem_fun_template_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_mem_fun_template_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Function signature has type which does not exist
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_data.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_data.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_has_static_mem_data.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+ BOOST_TEST((boost::tti::has_static_member_data_DSMember<AType,short>::value));
+ BOOST_TEST((!boost::tti::has_static_member_data_SomeStaticData<AnotherType,float>::value));
+ BOOST_TEST((boost::tti::StatName<AnotherType,AType::AStructType>::value));
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_data.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_data.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,11 @@
+#if !defined(TEST_HAS_STATIC_MEMBER_DATA_HPP)
+#define TEST_HAS_STATIC_MEMBER_DATA_HPP
+
+#include "test_structs.hpp"
+#include <boost/tti/static_mem_data.hpp>
+
+BOOST_TTI_HAS_STATIC_MEMBER_DATA(DSMember)
+BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_DATA(StatName,AnStat)
+BOOST_TTI_HAS_STATIC_MEMBER_DATA(SomeStaticData)
+
+#endif // TEST_HAS_STATIC_MEMBER_DATA_HPP
Added: sandbox/tti/libs/tti/test/test_has_static_mem_data_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_data_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,18 @@
+#include "test_has_static_mem_data.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // You can always instantiate without compiler errors
+
+ boost::tti::has_static_member_data_SomeStaticData<AnotherType,long> aVar2;
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((boost::tti::has_static_member_data_DSMember<AType,short>));
+ BOOST_MPL_ASSERT((boost::tti::StatName<AnotherType,AType::AStructType>));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_data_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_data_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_has_static_mem_data.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // SomeStaticData does not exist at all
+
+ BOOST_MPL_ASSERT((boost::tti::has_static_member_data_SomeStaticData<AnotherType,float>));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_data_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_data_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_has_static_mem_data.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Wrong enclosing type for DSMember
+
+ BOOST_MPL_ASSERT((boost::tti::has_static_member_data_DSMember<AnotherType,short>));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_data_fail3.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_data_fail3.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,12 @@
+#include "test_has_static_mem_data.hpp"
+
+int main()
+ {
+
+ // Data signature has type which does not exist
+
+ boost::tti::has_static_member_data_DSMember<NoType,short> aVar;
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_fun_template.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_fun_template.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,9 @@
+#include "test_has_static_mem_fun_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,19 @@
+#if !defined(TEST_HAS_STATIC_MEM_FUN_TEMPLATE_HPP)
+#define TEST_HAS_STATIC_MEM_FUN_TEMPLATE_HPP
+
+#include "test_structs.hpp"
+#include <boost/tti/static_mem_fun_template.hpp>
+#include <boost/tti/static_mem_fun_template_params.hpp>
+#include <boost/tti/mem_type.hpp>
+
+BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(StatFuncTemplate,(short)(long)(7854))
+BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(TAnother,AnotherFuncTemplate,(int)(long)(long))
+BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(YetAnotherFuncTemplate,(double)(float))
+
+BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(AStatFT,StatFuncTemplate)
+BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(AnotherFuncTemplate)
+BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(YAFuncTemp,YetAnotherFuncTemplate)
+
+BOOST_TTI_MEMBER_TYPE(AStructType)
+
+#endif // TEST_HAS_STATIC_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,9 @@
+#include "test_has_static_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,11 @@
+#include "test_has_static_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_has_static_mem_fun_template_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,11 @@
+#include "test_has_static_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Modified: sandbox/tti/libs/tti/test/test_has_static_member.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_has_static_member.cpp (original)
+++ sandbox/tti/libs/tti/test/test_has_static_member.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -4,12 +4,10 @@
int main()
{
- BOOST_TEST((boost::tti::has_static_member_DSMember<AType,short>::value));
BOOST_TEST((boost::tti::HaveTheSIntFunction<AType,int (long,double)>::value));
BOOST_TEST((!boost::tti::TheTIntFunction<AType,AType (long,double)>::value));
BOOST_TEST((boost::tti::TheTIntFunction<AnotherType,AType (long,double)>::value));
BOOST_TEST((boost::tti::has_static_member_TSFunction<AnotherType,AType::AStructType (AType::AnIntType,double)>::value));
- BOOST_TEST((!boost::tti::has_static_member_SomeStaticData<AnotherType,float>::value));
BOOST_TEST((!boost::tti::Pickedname<AnotherType,void ()>::value));
return boost::report_errors();
Modified: sandbox/tti/libs/tti/test/test_has_static_member.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_has_static_member.hpp (original)
+++ sandbox/tti/libs/tti/test/test_has_static_member.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -4,11 +4,9 @@
#include "test_structs.hpp"
#include <boost/tti/static_member.hpp>
-BOOST_TTI_HAS_STATIC_MEMBER(DSMember)
BOOST_TTI_TRAIT_HAS_STATIC_MEMBER(HaveTheSIntFunction,SIntFunction)
BOOST_TTI_TRAIT_HAS_STATIC_MEMBER(TheTIntFunction,TIntFunction)
BOOST_TTI_HAS_STATIC_MEMBER(TSFunction)
-BOOST_TTI_HAS_STATIC_MEMBER(SomeStaticData)
BOOST_TTI_TRAIT_HAS_STATIC_MEMBER(Pickedname,SomeStaticFunction)
#endif // TEST_HAS_STATIC_MEMBER_HPP
Modified: sandbox/tti/libs/tti/test/test_has_static_member_compile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_has_static_member_compile.cpp (original)
+++ sandbox/tti/libs/tti/test/test_has_static_member_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -7,12 +7,10 @@
// You can always instantiate without compiler errors
boost::tti::TheTIntFunction<AType,void (long,double)> aVar;
- boost::tti::has_static_member_SomeStaticData<AnotherType,long> aVar2;
boost::tti::Pickedname<AnotherType,AType (long,long)> aVar3;
// Compile time asserts
- BOOST_MPL_ASSERT((boost::tti::has_static_member_DSMember<AType,short>));
BOOST_MPL_ASSERT((boost::tti::HaveTheSIntFunction<AType,int (long,double)>));
BOOST_MPL_ASSERT((boost::tti::TheTIntFunction<AnotherType,AType (long,double)>));
BOOST_MPL_ASSERT((boost::tti::has_static_member_TSFunction<AnotherType,AType::AStructType (AType::AnIntType,double)>));
Modified: sandbox/tti/libs/tti/test/test_has_static_member_fail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_has_static_member_fail.cpp (original)
+++ sandbox/tti/libs/tti/test/test_has_static_member_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -4,9 +4,9 @@
int main()
{
- // SomeStaticData does not exist at all
+ // Wrong function signature for SIntFunction
- BOOST_MPL_ASSERT((boost::tti::has_static_member_SomeStaticData<AnotherType,float>));
+ BOOST_MPL_ASSERT((boost::tti::HaveTheSIntFunction<AType,int (float,double)>));
return 0;
Modified: sandbox/tti/libs/tti/test/test_has_static_member_fail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_has_static_member_fail2.cpp (original)
+++ sandbox/tti/libs/tti/test/test_has_static_member_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -1,12 +1,11 @@
#include "test_has_static_member.hpp"
-#include <boost/mpl/assert.hpp>
int main()
{
- // Wrong enclosing type for DSMember
+ // Function signature has type which does not exist
- BOOST_MPL_ASSERT((boost::tti::has_static_member_DSMember<AnotherType,short>));
+ boost::tti::has_static_member_TSFunction<AnotherType,AType::AClassType (AType::AnIntType,double)> aVar;
return 0;
Modified: sandbox/tti/libs/tti/test/test_has_static_member_fail4.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_has_static_member_fail4.cpp (original)
+++ sandbox/tti/libs/tti/test/test_has_static_member_fail4.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -3,9 +3,9 @@
int main()
{
- // Data signature has type which does not exist
+ // Function signature has type which does not exist
- boost::tti::has_static_member_DSMember<NoType,short> aVar;
+ boost::tti::has_static_member_TSFunction<AnotherType,AType::AClassType (AType::AnIntType,double)> aVar;
return 0;
Deleted: sandbox/tti/libs/tti/test/test_has_static_member_fail5.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_has_static_member_fail5.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
+++ (empty file)
@@ -1,12 +0,0 @@
-#include "test_has_static_member.hpp"
-
-int main()
- {
-
- // Function signature has type which does not exist
-
- boost::tti::has_static_member_TSFunction<AnotherType,AType::AClassType (AType::AnIntType,double)> aVar;
-
- return 0;
-
- }
Added: sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,11 @@
+#include "test_mf_has_mem_fun_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,32 @@
+#if !defined(TEST_MF_HAS_MEM_FUN_TEMPLATE_HPP)
+#define TEST_MF_HAS_MEM_FUN_TEMPLATE_HPP
+
+#include "test_structs.hpp"
+#include <boost/tti/mem_fun_template.hpp>
+#include <boost/tti/mem_fun_template_params.hpp>
+#include <boost/tti/mem_type.hpp>
+
+BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(SomeFuncTemplate,(int)(long)(double)(50))
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(SameName,AFuncTemplate,(int)(int)(float))
+BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(AFuncTemplate,(long)(9983))
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(AnotherName,MyFuncTemplate,(bool))
+
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(SomeFuncName,SomeFuncTemplate)
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(AnotherNameFT,AFuncTemplate)
+BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(OneFT,AFuncTemplate)
+BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE(MyFuncTemplate)
+
+BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(SomeFuncTemplate,(int)(long)(double)(50))
+BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(MTSameName,AFuncTemplate,(int)(int)(float))
+BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(AFuncTemplate,(long)(9983))
+BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS(SpecAnotherName,MyFuncTemplate,(bool))
+
+BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(TheMTFuncName,SomeFuncTemplate)
+BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(MTAnotherNameFT,AFuncTemplate)
+BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(FTOneMT,AFuncTemplate)
+BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE(MyFuncTemplate)
+
+BOOST_TTI_MEMBER_TYPE(BType)
+BOOST_TTI_MEMBER_TYPE(CType)
+
+#endif // TEST_MF_HAS_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,11 @@
+#include "test_mf_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_mf_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_mf_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail3.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_mem_fun_template_fail3.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_mf_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Modified: sandbox/tti/libs/tti/test/test_mf_has_static_data.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_mf_has_static_data.cpp (original)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_data.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -6,18 +6,18 @@
using namespace boost::mpl::placeholders;
- BOOST_TEST((boost::tti::mf_has_static_data
+ BOOST_TEST((boost::tti::mf_has_static_member_data
<
- boost::tti::has_static_member_DSMember<_,_>,
+ boost::tti::has_static_member_data_DSMember<_,_>,
boost::mpl::identity<AType>,
boost::mpl::identity<short>
>
::value
));
- BOOST_TEST((boost::tti::mf_has_static_data
+ BOOST_TEST((boost::tti::mf_has_static_member_data
<
- boost::tti::mtfc_has_static_member_DSMember,
+ boost::tti::mtfc_has_static_member_data_DSMember,
boost::mpl::identity<AType>,
boost::mpl::identity<short>
>
Modified: sandbox/tti/libs/tti/test/test_mf_has_static_data.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_mf_has_static_data.hpp (original)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_data.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -2,12 +2,12 @@
#define TEST_MF_HAS_STATIC_DATA_HPP
#include "test_structs.hpp"
-#include <boost/tti/static_member.hpp>
+#include <boost/tti/static_mem_data.hpp>
-BOOST_TTI_HAS_STATIC_MEMBER(DSMember)
-BOOST_TTI_HAS_STATIC_MEMBER(SomeStaticData)
+BOOST_TTI_HAS_STATIC_MEMBER_DATA(DSMember)
+BOOST_TTI_HAS_STATIC_MEMBER_DATA(SomeStaticData)
-BOOST_TTI_MTFC_HAS_STATIC_MEMBER(DSMember)
-BOOST_TTI_MTFC_HAS_STATIC_MEMBER(SomeStaticData)
+BOOST_TTI_MTFC_HAS_STATIC_MEMBER_DATA(DSMember)
+BOOST_TTI_MTFC_HAS_STATIC_MEMBER_DATA(SomeStaticData)
#endif // TEST_MF_HAS_STATIC_DATA_HPP
Modified: sandbox/tti/libs/tti/test/test_mf_has_static_data_compile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_mf_has_static_data_compile.cpp (original)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_data_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -8,26 +8,26 @@
// You can always instantiate without compiler errors
- boost::tti::mf_has_static_data
+ boost::tti::mf_has_static_member_data
<
- boost::tti::has_static_member_SomeStaticData<_,_>,
+ boost::tti::has_static_member_data_SomeStaticData<_,_>,
boost::mpl::identity<AnotherType>,
boost::mpl::identity<double>
> aVar;
// Compile time asserts
- BOOST_MPL_ASSERT((boost::tti::mf_has_static_data
+ BOOST_MPL_ASSERT((boost::tti::mf_has_static_member_data
<
- boost::tti::has_static_member_DSMember<_,_>,
+ boost::tti::has_static_member_data_DSMember<_,_>,
boost::mpl::identity<AType>,
boost::mpl::identity<short>
>
));
- BOOST_MPL_ASSERT((boost::tti::mf_has_static_data
+ BOOST_MPL_ASSERT((boost::tti::mf_has_static_member_data
<
- boost::tti::mtfc_has_static_member_DSMember,
+ boost::tti::mtfc_has_static_member_data_DSMember,
boost::mpl::identity<AType>,
boost::mpl::identity<short>
>
Modified: sandbox/tti/libs/tti/test/test_mf_has_static_data_fail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_mf_has_static_data_fail.cpp (original)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_data_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -8,9 +8,9 @@
// SomeStaticData does not exist at all
- BOOST_MPL_ASSERT((boost::tti::mf_has_static_data
+ BOOST_MPL_ASSERT((boost::tti::mf_has_static_member_data
<
- boost::tti::has_static_member_SomeStaticData<_,_>,
+ boost::tti::has_static_member_data_SomeStaticData<_,_>,
boost::mpl::identity<AnotherType>,
boost::mpl::identity<int>
>
Modified: sandbox/tti/libs/tti/test/test_mf_has_static_data_fail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_mf_has_static_data_fail2.cpp (original)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_data_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -8,9 +8,9 @@
// Wrong enclosing type
- BOOST_MPL_ASSERT((boost::tti::mf_has_static_data
+ BOOST_MPL_ASSERT((boost::tti::mf_has_static_member_data
<
- boost::tti::has_static_member_DSMember<_,_>,
+ boost::tti::has_static_member_data_DSMember<_,_>,
boost::mpl::identity<AnotherType>,
boost::mpl::identity<short>
>
Modified: sandbox/tti/libs/tti/test/test_mf_has_static_data_fail3.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_mf_has_static_data_fail3.cpp (original)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_data_fail3.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -8,9 +8,9 @@
// Wrong member type
- BOOST_MPL_ASSERT((boost::tti::mf_has_static_data
+ BOOST_MPL_ASSERT((boost::tti::mf_has_static_member_data
<
- boost::tti::has_static_member_DSMember<_,_>,
+ boost::tti::has_static_member_data_DSMember<_,_>,
boost::mpl::identity<AType>,
boost::mpl::identity<int>
>
Added: sandbox/tti/libs/tti/test/test_mf_has_static_fun_template.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_fun_template.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,11 @@
+#include "test_mf_has_static_fun_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_mf_has_static_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,27 @@
+#if !defined(TEST_MF_HAS_STATIC_FUN_TEMPLATE_HPP)
+#define TEST_MF_HAS_STATIC_FUN_TEMPLATE_HPP
+
+#include "test_structs.hpp"
+#include <boost/tti/static_mem_fun_template.hpp>
+#include <boost/tti/static_mem_fun_template_params.hpp>
+#include <boost/tti/mem_type.hpp>
+
+BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(StatFuncTemplate,(short)(long)(7854))
+BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(TAnother,AnotherFuncTemplate,(int)(long)(long))
+BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(YetAnotherFuncTemplate,(double)(float))
+
+BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(AStatFT,StatFuncTemplate)
+BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(AnotherFuncTemplate)
+BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(YAFuncTemp,YetAnotherFuncTemplate)
+
+BOOST_TTI_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(StatFuncTemplate,(short)(long)(7854))
+BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(MFCTAnother,AnotherFuncTemplate,(int)(long)(long))
+BOOST_TTI_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_PARAMS(YetAnotherFuncTemplate,(double)(float))
+
+BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(MCAStatFT,StatFuncTemplate)
+BOOST_TTI_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(AnotherFuncTemplate)
+BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(YAFuncTempMFC,YetAnotherFuncTemplate)
+
+BOOST_TTI_MEMBER_TYPE(AStructType)
+
+#endif // TEST_MF_HAS_STATIC_FUN_TEMPLATE_HPP
Added: sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,15 @@
+#include "test_mf_has_static_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ // You can always instantiate without compiler errors
+
+ // Compile time asserts
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,17 @@
+#include "test_mf_has_static_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ // You can always instantiate without compiler errors
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,17 @@
+#include "test_mf_has_static_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ // You can always instantiate without compiler errors
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail3.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_mf_has_static_fun_template_fail3.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,17 @@
+#include "test_mf_has_static_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ using namespace boost::mpl::placeholders;
+
+ // You can always instantiate without compiler errors
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+ return 0;
+
+ }
Modified: sandbox/tti/libs/tti/test/test_structs.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_structs.hpp (original)
+++ sandbox/tti/libs/tti/test/test_structs.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -10,6 +10,7 @@
struct AStructType
{
template <class> struct MStrMemberTemplate { };
+ template<class X,class Y,short AA> static int StatFuncTemplate(X *,Y) { int ret(AA); return ret; }
};
typedef int & AnIntTypeReference;
struct BType
@@ -19,6 +20,7 @@
{
typedef int AnotherIntegerType;
template <class,class,int,short,class,template <class,int> class InnerTemplate,class> struct CTManyParameters { };
+ template<class X,class Y,class Z,short AA> double SomeFuncTemplate(X,Y *,Z &) { double ret(AA); return ret; }
};
};
@@ -40,6 +42,11 @@
void VoidFunction() { }
int IntFunction() { return 0; }
+ // Function Templates
+
+ template<class X,int Y> int AFuncTemplate(const X &) { return Y; }
+ template<class X,class Y,class Z> void AFuncTemplate(X *,Y,Z &) { }
+
// Static Data
static short DSMember;
@@ -48,6 +55,10 @@
static int SIntFunction(long,double) { return 2; }
+ // Static Function Template
+
+ template<class X,class Y,class Z> static void AnotherFuncTemplate(X,Y &,const Z &) { }
+
};
struct AnotherType
@@ -78,15 +89,26 @@
AType::AnIntType sFunction(int,long,double) { return 0; }
double IntFunction(int) { return 0; }
- // Static Data
+ // Function Templates
+
+ template<class X> long MyFuncTemplate(X &) { return 0; }
// Static Function
static AType TIntFunction(long,double) { return AType(); }
static AType::AStructType TSFunction(AType::AnIntType,double) { return AType::AStructType(); }
+ // Static Data
+
+ static AType::AStructType AnStat;
+
+ // Static Function Template
+
+ template<class X,class Y> static void YetAnotherFuncTemplate(const X &,Y &) { }
+
};
short AType::DSMember(5622);
+AType::AStructType AnotherType::AnStat;
#endif // TEST_STRUCTS_HPP
Added: sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_vm_has_mem_fun_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,22 @@
+#if !defined(TEST_VM_HAS_MEM_FUN_TEMPLATE_HPP)
+#define TEST_VM_HAS_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#include "test_structs.hpp"
+#include <boost/tti/vm_mem_fun_template.hpp>
+#include <boost/tti/mem_type.hpp>
+
+BOOST_TTI_VM_HAS_MEMBER_FUNCTION_TEMPLATE(SomeFuncTemplate,int,long,long,21234)
+BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(SameName,AFuncTemplate,long,short,float)
+BOOST_TTI_VM_HAS_MEMBER_FUNCTION_TEMPLATE(AFuncTemplate,bool,2385)
+BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(AnotherName,MyFuncTemplate,double)
+
+BOOST_TTI_MEMBER_TYPE(BType)
+BOOST_TTI_MEMBER_TYPE(CType)
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+#endif // TEST_VM_HAS_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_vm_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,21 @@
+#include "test_vm_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ // Wrong function signature for
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_mem_fun_template_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,21 @@
+#include "test_vm_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ // Function signature has type which does not exist
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_vm_has_static_mem_fun_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,20 @@
+#if !defined(TEST_VM_HAS_STATIC_MEM_FUN_TEMPLATE_HPP)
+#define TEST_VM_HAS_STATIC_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#include "test_structs.hpp"
+#include <boost/tti/vm_static_mem_fun_template.hpp>
+#include <boost/tti/mem_type.hpp>
+
+BOOST_TTI_VM_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(StatFuncTemplate,short,bool,24)
+BOOST_TTI_VM_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(TAnother,AnotherFuncTemplate,double,double,long)
+BOOST_TTI_VM_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(YetAnotherFuncTemplate,long,int)
+
+BOOST_TTI_MEMBER_TYPE(AStructType)
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+#endif // TEST_VM_HAS_STATIC_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,13 @@
+#include "test_vm_has_static_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,19 @@
+#include "test_vm_has_static_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_has_static_mem_fun_template_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,19 @@
+#include "test_vm_has_static_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Modified: sandbox/tti/libs/tti/test/test_vm_has_template_cp.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_has_template_cp.hpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_has_template_cp.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -1,6 +1,8 @@
#if !defined(TEST_VM_HAS_TEMPLATE_CHECK_PARAMS_HPP)
#define TEST_VM_HAS_TEMPLATE_CHECK_PARAMS_HPP
+#include <boost/config.hpp>
+
#if !defined(BOOST_NO_VARIADIC_MACROS)
#include "test_structs.hpp"
Modified: sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail.cpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -10,6 +10,10 @@
BOOST_MPL_ASSERT((boost::tti::has_template_check_params_TemplateNotExist<AType>));
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
#endif //!defined(BOOST_NO_VARIADIC_MACROS)
return 0;
Modified: sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail2.cpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -10,6 +10,10 @@
BOOST_MPL_ASSERT((boost::tti::HaveCL<AnotherType>));
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
#endif //!defined(BOOST_NO_VARIADIC_MACROS)
return 0;
Modified: sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail3.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail3.cpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail3.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -10,6 +10,10 @@
BOOST_MPL_ASSERT((boost::tti::WrongParametersForMP<AnotherType>));
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
#endif //!defined(BOOST_NO_VARIADIC_MACROS)
return 0;
Modified: sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail4.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail4.cpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_has_template_cp_fail4.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -10,6 +10,10 @@
BOOST_MPL_ASSERT((boost::tti::WrongParameters2ForMP<AnotherType>));
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
#endif //!defined(BOOST_NO_VARIADIC_MACROS)
return 0;
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,15 @@
+#include "test_vm_mf_has_mem_fun_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,32 @@
+#if !defined(TEST_VM_MF_HAS_MEM_FUN_TEMPLATE_HPP)
+#define TEST_VM_MF_HAS_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#include "test_structs.hpp"
+#include <boost/tti/vm_mem_fun_template.hpp>
+#include <boost/tti/mem_type.hpp>
+
+BOOST_TTI_VM_HAS_MEMBER_FUNCTION_TEMPLATE(SomeFuncTemplate,int,long,long,21234)
+BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(SameName,AFuncTemplate,long,short,float)
+BOOST_TTI_VM_HAS_MEMBER_FUNCTION_TEMPLATE(AFuncTemplate,bool,2385)
+BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(AnotherName,MyFuncTemplate,double)
+
+BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(SpecSFT,SomeFuncTemplate)
+BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(SameNameAnoth,AFuncTemplate)
+BOOST_TTI_VM_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(SameNameAgain,AFuncTemplate)
+BOOST_TTI_VM_HAS_MEMBER_FUNCTION_TEMPLATE(MyFuncTemplate)
+
+BOOST_TTI_VM_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE(SomeFuncTemplate,int,long,long,21234)
+BOOST_TTI_VM_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(MFCSameName,AFuncTemplate)
+BOOST_TTI_VM_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE(AFuncTemplate)
+BOOST_TTI_VM_MTFC_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE(AnotherNameMFC,MyFuncTemplate,double)
+
+BOOST_TTI_MEMBER_TYPE(BType)
+BOOST_TTI_MEMBER_TYPE(CType)
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+#endif // TEST_VM_MF_HAS_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,15 @@
+#include "test_vm_mf_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,21 @@
+#include "test_vm_mf_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,21 @@
+#include "test_vm_mf_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail3.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_mem_fun_template_fail3.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,21 @@
+#include "test_vm_mf_has_mem_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,15 @@
+#include "test_vm_mf_has_static_fun_template.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return boost::report_errors();
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,28 @@
+#if !defined(TEST_VM_MF_HAS_STATIC_MEM_FUN_TEMPLATE_HPP)
+#define TEST_VM_MF_HAS_STATIC_MEM_FUN_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+#include "test_structs.hpp"
+#include <boost/tti/vm_static_mem_fun_template.hpp>
+#include <boost/tti/mem_type.hpp>
+
+BOOST_TTI_VM_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(StatFuncTemplate,short,bool,24)
+BOOST_TTI_VM_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(TAnother,AnotherFuncTemplate,double,double,long)
+BOOST_TTI_VM_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(YetAnotherFuncTemplate,long,int)
+
+BOOST_TTI_VM_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(TheStat,StatFuncTemplate)
+BOOST_TTI_VM_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(AnotherFuncTemplate)
+BOOST_TTI_VM_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(YetAgain,YetAnotherFuncTemplate)
+
+BOOST_TTI_VM_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(StatFuncTemplate,short,bool,24)
+BOOST_TTI_VM_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(TAnotherMeta,AnotherFuncTemplate)
+BOOST_TTI_VM_MTFC_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(YetAnotherFuncTemplate)
+
+BOOST_TTI_MEMBER_TYPE(AStructType)
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+#endif // TEST_VM_MF_HAS_STATIC_MEM_FUN_TEMPLATE_HPP
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_compile.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_compile.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,19 @@
+#include "test_vm_mf_has_static_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+ // You can always instantiate without compiler errors
+
+ // Compile time asserts
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,25 @@
+#include "test_vm_mf_has_static_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+ // You can always instantiate without compiler errors
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,25 @@
+#include "test_vm_mf_has_static_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+ // You can always instantiate without compiler errors
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Added: sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail3.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_static_fun_template_fail3.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -0,0 +1,25 @@
+#include "test_vm_mf_has_static_fun_template.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+#if !defined(BOOST_NO_VARIADIC_MACROS)
+
+ using namespace boost::mpl::placeholders;
+
+ // You can always instantiate without compiler errors
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
+#endif //!defined(BOOST_NO_VARIADIC_MACROS)
+
+ return 0;
+
+ }
Modified: sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp.hpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp.hpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -1,6 +1,8 @@
#if !defined(TEST_VM_MF_HAS_TEMPLATE_CHECK_PARAMS_HPP)
#define TEST_VM_MF_HAS_TEMPLATE_CHECK_PARAMS_HPP
+#include <boost/config.hpp>
+
#if !defined(BOOST_NO_VARIADIC_MACROS)
#include "test_structs.hpp"
Modified: sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail.cpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -21,6 +21,10 @@
>
));
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
#endif //!defined(BOOST_NO_VARIADIC_MACROS)
return 0;
Modified: sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail2.cpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail2.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -21,6 +21,10 @@
>
));
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
#endif //!defined(BOOST_NO_VARIADIC_MACROS)
return 0;
Modified: sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail3.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail3.cpp (original)
+++ sandbox/tti/libs/tti/test/test_vm_mf_has_template_cp_fail3.cpp 2011-03-07 21:21:16 EST (Mon, 07 Mar 2011)
@@ -17,6 +17,10 @@
>
));
+#else
+
+ BOOST_MPL_ASSERT((boost::mpl::false_));
+
#endif //!defined(BOOST_NO_VARIADIC_MACROS)
return 0;
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