Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66657 - sandbox/tti/boost/tti/detail
From: eldiener_at_[hidden]
Date: 2010-11-21 12:58:16


Author: eldiener
Date: 2010-11-21 12:58:15 EST (Sun, 21 Nov 2010)
New Revision: 66657
URL: http://svn.boost.org/trac/boost/changeset/66657

Log:
Eval code
Added:
   sandbox/tti/boost/tti/detail/TTIntrospectionIterateEval.hpp (contents, props changed)
Text files modified:
   sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp | 32 +++++++++++++++++++++++++++++++-
   1 files changed, 31 insertions(+), 1 deletions(-)

Modified: sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp
==============================================================================
--- sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp (original)
+++ sandbox/tti/boost/tti/detail/TTIntrospectionDetail.hpp 2010-11-21 12:58:15 EST (Sun, 21 Nov 2010)
@@ -1,7 +1,6 @@
 #if !defined(TT_INTROSPECTION_DETAIL_HPP)
 #define TT_INTROSPECTION_DETAIL_HPP
 
-#pragma once
 #include <boost/config.hpp>
 #include <boost/mpl/has_xxx.hpp>
 #include <boost/mpl/bool.hpp>
@@ -11,6 +10,11 @@
 #include <boost/preprocessor/arithmetic/add.hpp>
 #include <boost/preprocessor/arithmetic/sub.hpp>
 #include <boost/preprocessor/array/size.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
 
 #if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE)
 #define TTI_DETAIL_TEMPLATE_PARAMETERS(z,n,args) \
@@ -186,6 +190,14 @@
   }; \
 /**/
 
+#define TTI_DETAIL_PP_REPEAT_CLASS(z,n,data) \
+ BOOST_PP_COMMA_IF(n) data \
+/**/
+
+#define TTI_DETAIL_PP_ENUM_SHIFTED_TYPENAME(z,n,data) \
+ BOOST_PP_CAT(typename P,n::type) \
+/**/
+
 namespace tti
   {
   namespace detail
@@ -193,6 +205,24 @@
     struct notype
       {
       };
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES)
+
+ template<class T>
+ struct eval;
+
+#if !defined(TTI_MAX_PARAMETERS) || TTI_MAX_PARAMETERS < 1 || TTI_MAX_PARAMETERS > 256
+#define TTI_MAX_PARAMETERS 10
+#endif
+
+#define BOOST_PP_ITERATION_LIMITS (1,TTI_MAX_PARAMETERS)
+#define BOOST_PP_FILENAME_1 "TTIntrospectionIterateEval.hpp"
+#include BOOST_PP_ITERATE()
+
+#else
+
+#endif
+
     }
   }
 

Added: sandbox/tti/boost/tti/detail/TTIntrospectionIterateEval.hpp
==============================================================================
--- (empty file)
+++ sandbox/tti/boost/tti/detail/TTIntrospectionIterateEval.hpp 2010-11-21 12:58:15 EST (Sun, 21 Nov 2010)
@@ -0,0 +1,15 @@
+ template
+ <
+ template
+ <
+ BOOST_PP_REPEAT(BOOST_PP_ITERATION(),TTI_DETAIL_PP_REPEAT_CLASS,class)
+ >
+ class F,
+ BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ADD(1,BOOST_PP_ITERATION()),class P)
+ >
+ struct eval<F<BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ADD(1,BOOST_PP_ITERATION()),P)> > :
+ F
+ <
+ BOOST_PP_ENUM_SHIFTED(BOOST_PP_ADD(1,BOOST_PP_ITERATION()),TTI_DETAIL_PP_ENUM_SHIFTED_TYPENAME,pdata)
+ >
+ {};


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