$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r83514 - in trunk: boost/tti boost/tti/mf libs/tti/test
From: eldiener_at_[hidden]
Date: 2013-03-22 01:34:20
Author: eldiener
Date: 2013-03-22 01:34:17 EDT (Fri, 22 Mar 2013)
New Revision: 83514
URL: http://svn.boost.org/trac/boost/changeset/83514
Log:
Updated member type implementation to support user-defined marker type.
Removed:
   trunk/boost/tti/mf/
Text files modified: 
   trunk/boost/tti/member_type.hpp               |    16 ++++------------                        
   trunk/libs/tti/test/test_mem_type.cpp         |    17 ++++++++---------                       
   trunk/libs/tti/test/test_mem_type_compile.cpp |    17 ++++++++---------                       
   trunk/libs/tti/test/test_structs.hpp          |     4 ++++                                    
   4 files changed, 24 insertions(+), 30 deletions(-)
Modified: trunk/boost/tti/member_type.hpp
==============================================================================
--- trunk/boost/tti/member_type.hpp	(original)
+++ trunk/boost/tti/member_type.hpp	2013-03-22 01:34:17 EDT (Fri, 22 Mar 2013)
@@ -58,13 +58,13 @@
 #define BOOST_TTI_TRAIT_MEMBER_TYPE(trait,name) \
     BOOST_TTI_DETAIL_TRAIT_HAS_TYPE_MEMBER_TYPE(trait,name) \
     BOOST_TTI_DETAIL_TRAIT_MEMBER_TYPE(trait,name) \
-    template<class TTI_T> \
+    template<class TTI_T,class TTI_MARKER_TYPE = BOOST_TTI_NAMESPACE::detail::notype> \
     struct trait : \
       boost::mpl::eval_if \
         < \
         BOOST_PP_CAT(trait,_detail)<TTI_T>, \
         BOOST_PP_CAT(trait,_detail_member_type)<TTI_T>, \
-        boost::mpl::identity<BOOST_TTI_NAMESPACE::detail::notype> \
+        boost::mpl::identity<TTI_MARKER_TYPE> \
         > \
       { \
       }; \
@@ -126,22 +126,14 @@
           returns = 'value' is true if the type is valid, otherwise 'value' is false.
                           
     */
-    template
-      <
-      class TTI_T
-      >
+    template<class TTI_T,class TTI_MARKER_TYPE = BOOST_TTI_NAMESPACE::detail::notype>
     struct valid_member_type :
       boost::mpl::not_
         <
-        boost::is_same
-          <
-          TTI_T,
-          BOOST_TTI_NAMESPACE::detail::notype
-          >
+        boost::is_same<TTI_T,TTI_MARKER_TYPE>
         >
       {
       };
-      
     }
   }
   
Modified: trunk/libs/tti/test/test_mem_type.cpp
==============================================================================
--- trunk/libs/tti/test/test_mem_type.cpp	(original)
+++ trunk/libs/tti/test/test_mem_type.cpp	2013-03-22 01:34:17 EDT (Fri, 22 Mar 2013)
@@ -6,19 +6,18 @@
 
 #include "test_mem_type.hpp"
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/tti/mf/mf_member_type.hpp>
 
 int main()
   {
   
-  BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntType)<AType> >::value);
-  BOOST_TEST(boost::tti::mf_valid_member_type<NameStruct<AType> >::value);
-  BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntTypeReference)<AType> >::value);
-  BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType> >::value);
-  BOOST_TEST(boost::tti::mf_valid_member_type<TheInteger<AType::BType> >::value);
-  BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(CType)<AType::BType> >::value);
-  BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnotherIntegerType)<AType::BType::CType> >::value);
-  BOOST_TEST(boost::tti::mf_valid_member_type<SomethingElse<AnotherType> >::value);
+  BOOST_TEST(boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntType)<AType>::type>::value);
+  BOOST_TEST(boost::tti::valid_member_type<NameStruct<AType>::type>::value);
+  BOOST_TEST(boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntTypeReference)<AType>::type>::value);
+  BOOST_TEST(boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType>::type>::value);
+  BOOST_TEST(boost::tti::valid_member_type<TheInteger<AType::BType>::type>::value);
+  BOOST_TEST(boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(CType)<AType::BType>::type>::value);
+  BOOST_TEST(boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnotherIntegerType)<AType::BType::CType>::type>::value);
+  BOOST_TEST(boost::tti::valid_member_type<SomethingElse<AnotherType>::type>::value);
   
   return boost::report_errors();
 
Modified: trunk/libs/tti/test/test_mem_type_compile.cpp
==============================================================================
--- trunk/libs/tti/test/test_mem_type_compile.cpp	(original)
+++ trunk/libs/tti/test/test_mem_type_compile.cpp	2013-03-22 01:34:17 EDT (Fri, 22 Mar 2013)
@@ -6,19 +6,18 @@
 
 #include "test_mem_type.hpp"
 #include <boost/mpl/assert.hpp>
-#include <boost/tti/mf/mf_member_type.hpp>
 
 int main()
   {
   
-  BOOST_MPL_ASSERT((boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntType)<AType> >));
-  BOOST_MPL_ASSERT((boost::tti::mf_valid_member_type<NameStruct<AType> >));
-  BOOST_MPL_ASSERT((boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntTypeReference)<AType> >));
-  BOOST_MPL_ASSERT((boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType> >));
-  BOOST_MPL_ASSERT((boost::tti::mf_valid_member_type<TheInteger<AType::BType> >));
-  BOOST_MPL_ASSERT((boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(CType)<AType::BType> >));
-  BOOST_MPL_ASSERT((boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnotherIntegerType)<AType::BType::CType> >));
-  BOOST_MPL_ASSERT((boost::tti::mf_valid_member_type<SomethingElse<AnotherType> >));
+  BOOST_MPL_ASSERT((boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntType)<AType>::type>));
+  BOOST_MPL_ASSERT((boost::tti::valid_member_type<NameStruct<AType>::type>));
+  BOOST_MPL_ASSERT((boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntTypeReference)<AType>::type>));
+  BOOST_MPL_ASSERT((boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType>::type>));
+  BOOST_MPL_ASSERT((boost::tti::valid_member_type<TheInteger<AType::BType>::type>));
+  BOOST_MPL_ASSERT((boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(CType)<AType::BType>::type>));
+  BOOST_MPL_ASSERT((boost::tti::valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnotherIntegerType)<AType::BType::CType>::type>));
+  BOOST_MPL_ASSERT((boost::tti::valid_member_type<SomethingElse<AnotherType>::type>));
   
   return 0;
 
Modified: trunk/libs/tti/test/test_structs.hpp
==============================================================================
--- trunk/libs/tti/test/test_structs.hpp	(original)
+++ trunk/libs/tti/test/test_structs.hpp	2013-03-22 01:34:17 EDT (Fri, 22 Mar 2013)
@@ -145,6 +145,10 @@
   static const int CIntValue = 10;
   
   };
+  
+struct MarkerType
+  {
+  };
 
 short AType::DSMember(5622);
 AType::AStructType AnotherType::AnStat;