|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69733 - in sandbox/tti: boost/tti libs/tti/test
From: eldiener_at_[hidden]
Date: 2011-03-08 19:26:55
Author: eldiener
Date: 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
New Revision: 69733
URL: http://svn.boost.org/trac/boost/changeset/69733
Log:
Added generation macros and fixed redefinition.
Text files modified:
sandbox/tti/boost/tti/comp_mem_fun.hpp | 5 +++--
sandbox/tti/boost/tti/comp_static_mem_fun.hpp | 5 +++--
sandbox/tti/boost/tti/mem_data.hpp | 5 +++--
sandbox/tti/boost/tti/mem_fun.hpp | 5 +++--
sandbox/tti/boost/tti/mem_fun_template.hpp | 5 +++--
sandbox/tti/boost/tti/mem_fun_template_params.hpp | 5 +++--
sandbox/tti/boost/tti/mem_type.hpp | 5 +++--
sandbox/tti/boost/tti/mf_static_mem_fun_template.hpp | 2 +-
sandbox/tti/boost/tti/static_mem_data.hpp | 5 +++--
sandbox/tti/boost/tti/static_mem_fun.hpp | 5 +++--
sandbox/tti/boost/tti/template.hpp | 5 +++--
sandbox/tti/boost/tti/template_params.hpp | 5 +++--
sandbox/tti/boost/tti/vm_template_params.hpp | 5 +++--
sandbox/tti/libs/tti/test/test_has_mem_data.cpp | 21 +++++++++++----------
14 files changed, 48 insertions(+), 35 deletions(-)
Modified: sandbox/tti/boost/tti/comp_mem_fun.hpp
==============================================================================
--- sandbox/tti/boost/tti/comp_mem_fun.hpp (original)
+++ sandbox/tti/boost/tti/comp_mem_fun.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -5,6 +5,7 @@
#include <boost/mpl/apply.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/preprocessor/cat.hpp>
+#include "gen/comp_mem_fun_gen.hpp"
#include "detail/dcomp_mem_fun.hpp"
/*
@@ -113,7 +114,7 @@
#define BOOST_TTI_HAS_COMP_MEMBER_FUNCTION(name) \
BOOST_TTI_TRAIT_HAS_COMP_MEMBER_FUNCTION \
( \
- BOOST_PP_CAT(has_comp_member_function_,name), \
+ BOOST_TTI_HAS_COMP_MEMBER_FUNCTION_GEN_BASE(name), \
name \
) \
/**/
@@ -138,7 +139,7 @@
#define BOOST_TTI_MTFC_HAS_COMP_MEMBER_FUNCTION(name) \
BOOST_TTI_MTFC_TRAIT_HAS_COMP_MEMBER_FUNCTION \
( \
- BOOST_PP_CAT(mtfc_has_comp_member_function_,name), \
+ BOOST_TTI_MTFC_HAS_COMP_MEMBER_FUNCTION_GEN_BASE(name), \
name \
) \
/**/
Modified: sandbox/tti/boost/tti/comp_static_mem_fun.hpp
==============================================================================
--- sandbox/tti/boost/tti/comp_static_mem_fun.hpp (original)
+++ sandbox/tti/boost/tti/comp_static_mem_fun.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -5,6 +5,7 @@
#include <boost/mpl/apply.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/preprocessor/cat.hpp>
+#include "gen/comp_static_mem_fun_gen.hpp"
#include "detail/dcomp_static_mem_fun.hpp"
/*
@@ -123,7 +124,7 @@
#define BOOST_TTI_HAS_COMP_STATIC_MEMBER_FUNCTION(name) \
BOOST_TTI_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION \
( \
- BOOST_PP_CAT(has_comp_static_member_function_,name), \
+ BOOST_TTI_HAS_COMP_STATIC_MEMBER_FUNCTION_GEN_BASE(name), \
name \
) \
/**/
@@ -151,7 +152,7 @@
#define BOOST_TTI_MTFC_HAS_COMP_STATIC_MEMBER_FUNCTION(name) \
BOOST_TTI_MTFC_TRAIT_HAS_COMP_STATIC_MEMBER_FUNCTION \
( \
- BOOST_PP_CAT(mtfc_has_comp_static_member_function_,name), \
+ BOOST_TTI_MTFC_HAS_COMP_STATIC_MEMBER_FUNCTION_GEN_BASE(name), \
name \
) \
/**/
Modified: sandbox/tti/boost/tti/mem_data.hpp
==============================================================================
--- sandbox/tti/boost/tti/mem_data.hpp (original)
+++ sandbox/tti/boost/tti/mem_data.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -7,6 +7,7 @@
#include <boost/mpl/placeholders.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/type_traits/remove_const.hpp>
+#include "gen/mem_data_gen.hpp"
#include "detail/dmem_data.hpp"
/*
@@ -115,7 +116,7 @@
#define BOOST_TTI_HAS_MEMBER_DATA(name) \
BOOST_TTI_TRAIT_HAS_MEMBER_DATA \
( \
- BOOST_PP_CAT(has_member_data_,name), \
+ BOOST_TTI_HAS_MEMBER_DATA_GEN_BASE(name), \
name \
) \
/**/
@@ -140,7 +141,7 @@
#define BOOST_TTI_MTFC_HAS_MEMBER_DATA(name) \
BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_DATA \
( \
- BOOST_PP_CAT(mtfc_has_member_data_,name), \
+ BOOST_TTI_MTFC_HAS_MEMBER_DATA_GEN_BASE(name), \
name \
) \
/**/
Modified: sandbox/tti/boost/tti/mem_fun.hpp
==============================================================================
--- sandbox/tti/boost/tti/mem_fun.hpp (original)
+++ sandbox/tti/boost/tti/mem_fun.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -10,6 +10,7 @@
#include <boost/mpl/vector.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/type_traits/remove_const.hpp>
+#include "gen/mem_fun_gen.hpp"
#include "detail/dmem_fun.hpp"
#include "detail/dtself.hpp"
@@ -131,7 +132,7 @@
#define BOOST_TTI_HAS_MEMBER_FUNCTION(name) \
BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION \
( \
- BOOST_PP_CAT(has_member_function_,name), \
+ BOOST_TTI_HAS_MEMBER_FUNCTION_GEN_BASE(name), \
name \
) \
/**/
@@ -160,7 +161,7 @@
#define BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION(name) \
BOOST_TTI_MTFC_TRAIT_HAS_MEMBER_FUNCTION \
( \
- BOOST_PP_CAT(mtfc_has_member_function_,name), \
+ BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_GEN_BASE(name), \
name \
) \
/**/
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-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -7,6 +7,7 @@
#include <boost/preprocessor/cat.hpp>
#include <boost/type_traits/remove_const.hpp>
#include "mf_mem_fun_template.hpp"
+#include "gen/mem_fun_template_gen.hpp"
#include "detail/dmem_fun_template.hpp"
/*
@@ -127,7 +128,7 @@
#define BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE(name) \
BOOST_TTI_TRAIT_HAS_MEMBER_FUNCTION_TEMPLATE \
( \
- BOOST_PP_CAT(has_member_function_template_,name), \
+ BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN_BASE(name), \
name \
) \
/**/
@@ -156,7 +157,7 @@
#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), \
+ BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE_GEN_BASE(name), \
name \
) \
/**/
Modified: sandbox/tti/boost/tti/mem_fun_template_params.hpp
==============================================================================
--- sandbox/tti/boost/tti/mem_fun_template_params.hpp (original)
+++ sandbox/tti/boost/tti/mem_fun_template_params.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -10,6 +10,7 @@
#include <boost/preprocessor/tuple/to_list.hpp>
#include <boost/type_traits/remove_const.hpp>
#include "mf_mem_fun_template.hpp"
+#include "gen/mem_fun_template_params_gen.hpp"
#include "detail/dmem_fun_template.hpp"
/*
@@ -142,7 +143,7 @@
#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), \
+ BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS_GEN_BASE(name), \
name, \
tpseq \
) \
@@ -176,7 +177,7 @@
#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), \
+ BOOST_TTI_MTFC_HAS_MEMBER_FUNCTION_TEMPLATE_PARAMS_GEN_BASE(name), \
name, \
tpseq \
) \
Modified: sandbox/tti/boost/tti/mem_type.hpp
==============================================================================
--- sandbox/tti/boost/tti/mem_type.hpp (original)
+++ sandbox/tti/boost/tti/mem_type.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -9,6 +9,7 @@
#include <boost/mpl/placeholders.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/type_traits/is_same.hpp>
+#include "gen/mem_type_gen.hpp"
#include "detail/dmem_type.hpp"
#include "detail/dnotype.hpp"
@@ -139,7 +140,7 @@
#define BOOST_TTI_MEMBER_TYPE(name) \
BOOST_TTI_TRAIT_MEMBER_TYPE \
( \
- BOOST_PP_CAT(member_type_,name), \
+ BOOST_TTI_MEMBER_TYPE_GEN_BASE(name), \
name \
) \
/**/
@@ -167,7 +168,7 @@
#define BOOST_TTI_MTFC_MEMBER_TYPE(name) \
BOOST_TTI_MTFC_TRAIT_MEMBER_TYPE \
( \
- BOOST_PP_CAT(mtfc_member_type_,name), \
+ BOOST_TTI_MTFC_MEMBER_TYPE_GEN_BASE(name), \
name \
) \
/**/
Modified: sandbox/tti/boost/tti/mf_static_mem_fun_template.hpp
==============================================================================
--- sandbox/tti/boost/tti/mf_static_mem_fun_template.hpp (original)
+++ sandbox/tti/boost/tti/mf_static_mem_fun_template.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -55,7 +55,7 @@
class FS = boost::mpl::vector<>,
class TAG = boost::function_types::null_tag
>
- struct mf_has_static_member_function :
+ struct mf_has_static_member_function_template :
boost::mpl::apply
<
HasStaticMemberFunctionTemplate,
Modified: sandbox/tti/boost/tti/static_mem_data.hpp
==============================================================================
--- sandbox/tti/boost/tti/static_mem_data.hpp (original)
+++ sandbox/tti/boost/tti/static_mem_data.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -6,6 +6,7 @@
#include <boost/mpl/identity.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/preprocessor/cat.hpp>
+#include "gen/static_mem_data_gen.hpp"
#include "detail/dstatic_mem_data.hpp"
/*
@@ -124,7 +125,7 @@
#define BOOST_TTI_HAS_STATIC_MEMBER_DATA(name) \
BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_DATA \
( \
- BOOST_PP_CAT(has_static_member_data_,name), \
+ BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN_BASE(name), \
name \
) \
/**/
@@ -152,7 +153,7 @@
#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), \
+ BOOST_TTI_MTFC_HAS_STATIC_MEMBER_DATA_GEN_BASE(name), \
name \
) \
/**/
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-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -9,6 +9,7 @@
#include <boost/mpl/transform.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/preprocessor/cat.hpp>
+#include "gen/static_mem_fun_gen.hpp"
#include "detail/dstatic_mem_fun.hpp"
#include "detail/dtfunction.hpp"
#include "detail/dtself.hpp"
@@ -131,7 +132,7 @@
#define BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION(name) \
BOOST_TTI_TRAIT_HAS_STATIC_MEMBER_FUNCTION \
( \
- BOOST_PP_CAT(has_static_member_function_,name), \
+ BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN_BASE(name), \
name \
) \
/**/
@@ -160,7 +161,7 @@
#define BOOST_TTI_MTFC_HAS_STATIC_MEMBER_FUNCTION(name) \
BOOST_TTI_MTFC_TRAIT_HAS_STATIC_MEMBER_FUNCTION \
( \
- BOOST_PP_CAT(mtfc_has_static_member_function_,name), \
+ BOOST_TTI_MTFC_HAS_STATIC_MEMBER_FUNCTION_GEN_BASE(name), \
name \
) \
/**/
Modified: sandbox/tti/boost/tti/template.hpp
==============================================================================
--- sandbox/tti/boost/tti/template.hpp (original)
+++ sandbox/tti/boost/tti/template.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -7,6 +7,7 @@
#include <boost/mpl/identity.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/preprocessor/cat.hpp>
+#include "gen/template_gen.hpp"
/*
@@ -114,7 +115,7 @@
#define BOOST_TTI_HAS_TEMPLATE(name) \
BOOST_TTI_TRAIT_HAS_TEMPLATE \
( \
- BOOST_PP_CAT(has_template_,name), \
+ BOOST_TTI_HAS_TEMPLATE_GEN_BASE(name), \
name \
) \
/**/
@@ -139,7 +140,7 @@
#define BOOST_TTI_MTFC_HAS_TEMPLATE(name) \
BOOST_TTI_MTFC_TRAIT_HAS_TEMPLATE \
( \
- BOOST_PP_CAT(mtfc_has_template_,name), \
+ BOOST_TTI_MTFC_HAS_TEMPLATE_GEN_BASE(name), \
name \
) \
/**/
Modified: sandbox/tti/boost/tti/template_params.hpp
==============================================================================
--- sandbox/tti/boost/tti/template_params.hpp (original)
+++ sandbox/tti/boost/tti/template_params.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -6,6 +6,7 @@
#include <boost/mpl/identity.hpp>
#include <boost/preprocessor/cat.hpp>
#include "mf_template_params.hpp"
+#include "gen/template_params_gen.hpp"
#include "detail/dtemplate_params.hpp"
/*
@@ -123,7 +124,7 @@
#define BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS(name,tpSeq) \
BOOST_TTI_TRAIT_HAS_TEMPLATE_CHECK_PARAMS \
( \
- BOOST_PP_CAT(has_template_check_params_,name), \
+ BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS_GEN_BASE(name), \
name, \
tpSeq \
) \
@@ -152,7 +153,7 @@
#define BOOST_TTI_MTFC_HAS_TEMPLATE_CHECK_PARAMS(name,tpSeq) \
BOOST_TTI_MTFC_TRAIT_HAS_TEMPLATE_CHECK_PARAMS \
( \
- BOOST_PP_CAT(mtfc_has_template_check_params_,name), \
+ BOOST_TTI_MTFC_HAS_TEMPLATE_CHECK_PARAMS_GEN_BASE(name), \
name, \
tpSeq \
) \
Modified: sandbox/tti/boost/tti/vm_template_params.hpp
==============================================================================
--- sandbox/tti/boost/tti/vm_template_params.hpp (original)
+++ sandbox/tti/boost/tti/vm_template_params.hpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -7,6 +7,7 @@
#include <boost/preprocessor/cat.hpp>
#include "mf_template_params.hpp"
+#include "gen/vm_template_params_gen.hpp"
#include "detail/dvm_template_params.hpp"
/*
@@ -123,7 +124,7 @@
#define BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS(name,...) \
BOOST_TTI_VM_TRAIT_HAS_TEMPLATE_CHECK_PARAMS \
( \
- BOOST_PP_CAT(has_template_check_params_,name), \
+ BOOST_TTI_VM_HAS_TEMPLATE_CHECK_PARAMS_GEN_BASE(name), \
name, \
__VA_ARGS__ \
) \
@@ -150,7 +151,7 @@
#define BOOST_TTI_VM_MTFC_HAS_TEMPLATE_CHECK_PARAMS(name,...) \
BOOST_TTI_VM_MTFC_TRAIT_HAS_TEMPLATE_CHECK_PARAMS \
( \
- BOOST_PP_CAT(mtfc_has_template_check_params_,name), \
+ BOOST_TTI_VM_MTFC_HAS_TEMPLATE_CHECK_PARAMS_GEN_BASE(name), \
name, \
__VA_ARGS__ \
) \
Modified: sandbox/tti/libs/tti/test/test_has_mem_data.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/test_has_mem_data.cpp (original)
+++ sandbox/tti/libs/tti/test/test_has_mem_data.cpp 2011-03-08 19:26:52 EST (Tue, 08 Mar 2011)
@@ -1,19 +1,20 @@
#include "test_has_mem_data.hpp"
+#include <boost/tti/gen/trait_gen.hpp>
#include <boost/detail/lightweight_test.hpp>
int main()
{
- BOOST_TEST((boost::tti::has_member_data_AnInt<AType,int>::value));
- BOOST_TEST((boost::tti::has_member_data_AnInt<AnotherType,long>::value));
- BOOST_TEST((boost::tti::has_member_data_aMember<AnotherType,bool>::value));
- BOOST_TEST((!boost::tti::has_member_data_aMember<AnotherType,int>::value));
- BOOST_TEST((boost::tti::CMember<AnotherType,bool>::value));
- BOOST_TEST((!boost::tti::has_member_data_someDataMember<AType,short>::value));
- BOOST_TEST((boost::tti::has_member_data_IntBT<AType,AType::BType>::value));
- BOOST_TEST((boost::tti::NestedData<AType,AType::BType::CType>::value));
- BOOST_TEST((boost::tti::AOther<AnotherType,AType>::value));
- BOOST_TEST((boost::tti::has_member_data_ONestStr<AnotherType,AType::AStructType>::value));
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(AnInt)<AType,int>::value));
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(AnInt)<AnotherType,long>::value));
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(aMember)<AnotherType,bool>::value));
+ BOOST_TEST((!BOOST_TTI_HAS_MEMBER_DATA_GEN(aMember)<AnotherType,int>::value));
+ BOOST_TEST((BOOST_TTI_TRAIT_GEN(CMember)<AnotherType,bool>::value));
+ BOOST_TEST((!BOOST_TTI_HAS_MEMBER_DATA_GEN(someDataMember)<AType,short>::value));
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(IntBT)<AType,AType::BType>::value));
+ BOOST_TEST((BOOST_TTI_TRAIT_GEN(NestedData)<AType,AType::BType::CType>::value));
+ BOOST_TEST((BOOST_TTI_TRAIT_GEN(AOther)<AnotherType,AType>::value));
+ BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(ONestStr)<AnotherType,AType::AStructType>::value));
return boost::report_errors();
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