Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68765 - in sandbox/tti/boost/tti: . detail
From: eldiener_at_[hidden]
Date: 2011-02-10 16:13:55


Author: eldiener
Date: 2011-02-10 16:13:53 EST (Thu, 10 Feb 2011)
New Revision: 68765
URL: http://svn.boost.org/trac/boost/changeset/68765

Log:
Use forwarding.
Text files modified:
   sandbox/tti/boost/tti/TTIntrospection.hpp | 146 +++++++++++++--------------------------
   sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp | 3
   2 files changed, 53 insertions(+), 96 deletions(-)

Modified: sandbox/tti/boost/tti/TTIntrospection.hpp
==============================================================================
--- sandbox/tti/boost/tti/TTIntrospection.hpp (original)
+++ sandbox/tti/boost/tti/TTIntrospection.hpp 2011-02-10 16:13:53 EST (Thu, 10 Feb 2011)
@@ -50,21 +50,15 @@
     { \
     TTI_DETAIL_TRAIT_HAS_TYPE(trait,name) \
     } \
- \
   template<class T,class U = tti::detail::notype> \
- struct trait \
- { \
- \
- typedef typename \
- detail::trait \
+ struct trait : \
+ detail::trait \
       < \
       T, \
       U, \
       typename detail::mpl::trait<T>::type \
- >::type \
- type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
+ > \
+ { \
     }; \
   } \
 /**/
@@ -93,23 +87,17 @@
     { \
     TTI_DETAIL_TRAIT_HAS_TYPE(trait,name) \
     } \
- \
   struct trait \
     { \
     template<class T,class U = tti::detail::notype> \
- struct apply \
- { \
- \
- typedef typename \
- detail::trait \
+ struct apply : \
+ detail::trait \
         < \
         T, \
         U, \
         typename detail::mpl::trait<T>::type \
- >::type \
- type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
+ > \
+ { \
       }; \
     }; \
   } \
@@ -192,16 +180,14 @@
     TTI_DETAIL_TRAIT_MEMBER_TYPE(trait,name) \
     } \
   template<class T> \
- struct trait \
+ struct trait : \
+ boost::mpl::eval_if \
+ < \
+ tti::detail::trait<T>, \
+ tti::detail::member_type::trait<T>, \
+ boost::mpl::identity<tti::detail::notype> \
+ > \
     { \
- typedef typename \
- boost::mpl::eval_if \
- < \
- tti::detail::trait<T>, \
- tti::detail::member_type::trait<T>, \
- boost::mpl::identity<tti::detail::notype> \
- >::type \
- type; \
     }; \
   } \
 /**/
@@ -237,16 +223,14 @@
   struct trait \
     { \
     template<class T> \
- struct apply \
+ struct apply : \
+ boost::mpl::eval_if \
+ < \
+ tti::detail::trait<T>, \
+ tti::detail::member_type::trait<T>, \
+ boost::mpl::identity<tti::detail::notype> \
+ > \
       { \
- typedef typename \
- boost::mpl::eval_if \
- < \
- tti::detail::trait<T>, \
- tti::detail::member_type::trait<T>, \
- boost::mpl::identity<tti::detail::notype> \
- >::type \
- type; \
       }; \
     }; \
   } \
@@ -331,11 +315,9 @@
     BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, false) \
     } \
   template<class T> \
- struct trait \
+ struct trait : \
+ tti::detail::trait<T> \
     { \
- typedef typename tti::detail::trait<T>::type type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
     }; \
   } \
 /**/
@@ -367,11 +349,9 @@
   struct trait \
     { \
     template<class T> \
- struct apply \
+ struct apply : \
+ tti::detail::trait<T> \
       { \
- typedef typename tti::detail::trait<T>::type type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
       }; \
     }; \
   } \
@@ -452,11 +432,9 @@
     TTI_DETAIL_TRAIT_HAS_TEMPLATE_CHECK_PARAMS(trait,name,tpSeq) \
     } \
   template<class T> \
- struct trait \
+ struct trait : \
+ detail::trait<T> \
     { \
- typedef typename detail::trait<T>::type type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
     }; \
   } \
 /**/
@@ -490,11 +468,9 @@
   struct trait \
     { \
     template<class T> \
- struct apply \
+ struct apply : \
+ detail::trait::apply<T> \
       { \
- typedef typename detail::trait::apply<T>::type type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
       }; \
     }; \
   } \
@@ -578,12 +554,9 @@
     TTI_DETAIL_TRAIT_HAS_MEMBER(trait,name) \
     } \
   template<class T> \
- struct trait \
+ struct trait : \
+ detail::trait<T> \
     { \
- typedef typename detail::trait<T>::type type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
- \
     }; \
   } \
 /**/
@@ -614,12 +587,9 @@
   struct trait \
     { \
     template<class T> \
- struct apply \
+ struct apply : \
+ detail::trait<T> \
       { \
- typedef typename detail::trait<T>::type type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
- \
       }; \
     }; \
   } \
@@ -697,11 +667,9 @@
     TTI_DETAIL_TRAIT_HAS_MEMBER_FUNCTION(trait,name) \
     } \
   template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
- struct trait \
+ struct trait : \
+ detail::trait<typename detail::ptmf_seq<T,R,FS,TAG>::type,typename boost::remove_const<T>::type> \
     { \
- typedef detail::trait<typename detail::ptmf_seq<T,R,FS,TAG>::type,typename boost::remove_const<T>::type> type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
     }; \
   } \
 /**/
@@ -734,11 +702,9 @@
   struct trait \
     { \
     template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
- struct apply \
+ struct apply : \
+ detail::trait<typename detail::ptmf_seq<T,R,FS,TAG>::type,typename boost::remove_const<T>::type> \
       { \
- typedef detail::trait<typename detail::ptmf_seq<T,R,FS,TAG>::type,typename boost::remove_const<T>::type> type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
       }; \
     }; \
   } \
@@ -818,11 +784,9 @@
     TTI_DETAIL_TRAIT_HAS_MEMBER_DATA(trait,name) \
     } \
   template<class T,class R> \
- struct trait \
+ struct trait : \
+ detail::trait<typename detail::ptmd<T,R>::type,typename boost::remove_const<T>::type> \
     { \
- typedef detail::trait<typename detail::ptmd<T,R>::type,typename boost::remove_const<T>::type> type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
     }; \
   } \
 /**/
@@ -853,11 +817,9 @@
   struct trait \
     { \
     template<class T,class R> \
- struct apply \
+ struct apply : \
+ detail::trait<typename detail::ptmd<T,R>::type,typename boost::remove_const<T>::type> \
       { \
- typedef detail::trait<typename detail::ptmd<T,R>::type,typename boost::remove_const<T>::type> type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
       }; \
     }; \
   } \
@@ -936,11 +898,9 @@
     TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER(trait,name) \
     } \
   template<class T,class Type> \
- struct trait \
+ struct trait : \
+ detail::trait<T,Type> \
     { \
- typedef typename detail::trait<T,Type>::type type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
     }; \
   } \
 /**/
@@ -974,11 +934,9 @@
   struct trait \
     { \
     template<class T,class Type> \
- struct apply \
+ struct apply : \
+ detail::trait::apply<T,Type> \
       { \
- typedef typename detail::trait::apply<T,Type>::type type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
       }; \
     }; \
   } \
@@ -1063,11 +1021,9 @@
     TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION(trait,name) \
     } \
   template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
- struct trait \
+ struct trait : \
+ detail::trait<T,typename detail::tfunction_seq<R,FS,TAG>::type> \
     { \
- typedef detail::trait<T,typename detail::tfunction_seq<R,FS,TAG>::type> type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
     }; \
   } \
 /**/
@@ -1100,11 +1056,9 @@
   struct trait \
     { \
     template<class T,class R,class FS = boost::mpl::vector<>,class TAG = boost::function_types::null_tag> \
- struct apply \
+ struct apply : \
+ detail::trait<T,typename detail::tfunction_seq<R,FS,TAG>::type> \
       { \
- typedef detail::trait<T,typename detail::tfunction_seq<R,FS,TAG>::type> type; \
- \
- BOOST_STATIC_CONSTANT(bool,value=type::value); \
       }; \
     }; \
   } \

Modified: sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp
==============================================================================
--- sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp (original)
+++ sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp 2011-02-10 16:13:53 EST (Thu, 10 Feb 2011)
@@ -265,18 +265,21 @@
       boost::mpl::false_ \
>::type \
   type; \
+ BOOST_STATIC_CONSTANT(bool,value=type::value); \
   }; \
 \
 template<class T,class U> \
 struct trait<T,U,boost::mpl::false_::type> \
   { \
   typedef boost::mpl::false_::type type; \
+ BOOST_STATIC_CONSTANT(bool,value=type::value); \
   }; \
 \
 template<class T> \
 struct trait<T,tti::detail::notype,boost::mpl::true_::type> \
   { \
   typedef boost::mpl::true_::type type; \
+ BOOST_STATIC_CONSTANT(bool,value=type::value); \
   }; \
 /**/
 


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