|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r49655 - sandbox/parameter_ext/boost/parameter_ext/detail
From: vicente.botet_at_[hidden]
Date: 2008-11-08 18:02:44
Author: viboes
Date: 2008-11-08 18:02:44 EST (Sat, 08 Nov 2008)
New Revision: 49655
URL: http://svn.boost.org/trac/boost/changeset/49655
Log:
Change to mpl_ext namespace and move to detail
Added:
sandbox/parameter_ext/boost/parameter_ext/detail/expr_pp.hpp (contents, props changed)
Added: sandbox/parameter_ext/boost/parameter_ext/detail/expr_pp.hpp
==============================================================================
--- (empty file)
+++ sandbox/parameter_ext/boost/parameter_ext/detail/expr_pp.hpp 2008-11-08 18:02:44 EST (Sat, 08 Nov 2008)
@@ -0,0 +1,61 @@
+/* Copyright 2008 Vicente J. Botet Escriba
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * See http://www.boost.org/libs/ for library home page.
+ */
+#ifndef BOOST_PP_IS_ITERATING
+
+#ifndef BOOST_PARAMETER_EXT_EXPR_PP_HPP_
+#define BOOST_PARAMETER_EXT_EXPR_PP_HPP_
+
+# include <boost/preprocessor/repetition.hpp>
+# include <boost/preprocessor/arithmetic/sub.hpp>
+# include <boost/preprocessor/punctuation/comma_if.hpp>
+# include <boost/preprocessor/iteration/iterate.hpp>
+
+// generate specializations
+# define BOOST_PP_ITERATION_LIMITS (1, BOOST_PARAMETER_EXT_EXPR_ARITY)
+# define BOOST_PP_FILENAME_1 "boost/parameter_ext/detail/expr_pp.hpp" // this file
+# include BOOST_PP_ITERATE()
+
+#endif // BOOST_PARAMETER_EXT_EXPR_HPP_
+
+#else // BOOST_PP_IS_ITERATING
+
+# define n BOOST_PP_ITERATION()
+
+# define BOOST_PARAMETER_EXT_EXPR_signature_parameter(z, n, data) \
+ typename signature_parameter<Param##n>::type
+
+
+namespace boost {
+namespace parameter_ext {
+namespace detail{
+
+template <BOOST_PP_ENUM_PARAMS(n,typename Param)>
+struct signature<mpl::vector<BOOST_PP_ENUM_PARAMS(n,Param)> >{
+ typedef parameter::parameters<
+ BOOST_PP_ENUM(n,BOOST_PARAMETER_EXT_EXPR_signature_parameter,~)
+ > type;
+};
+
+template <typename Signature, BOOST_PP_ENUM_PARAMS(n,typename Arg)>
+struct args<Signature, mpl::vector<BOOST_PP_ENUM_PARAMS(n,Arg)> > {
+ typedef typename Signature::template bind<BOOST_PP_ENUM_PARAMS(n,Arg)>::type type;
+};
+
+template <typename UnmatchedSignature, BOOST_PP_ENUM_PARAMS(n,typename Arg)>
+struct unmatched_args<UnmatchedSignature, mpl::vector<BOOST_PP_ENUM_PARAMS(n,Arg)> > {
+ typedef typename UnmatchedSignature::template bind<BOOST_PP_ENUM_PARAMS(n,Arg)>::type type;
+};
+
+}
+}
+}
+
+# undef n
+# undef BOOST_PARAMETER_EXT_EXPR_signature_parameter
+
+#endif // BOOST_PP_IS_ITERATING
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