Add Boost.Parameter Version 1.33.1 to senf repository
[senf.git] / Console / ParsedCommand.mpp
index 2aadffc..df42e0a 100644 (file)
@@ -29,6 +29,8 @@
 // Custom includes
 #include <boost/preprocessor/iteration/iterate.hpp>
 #include <boost/preprocessor/repetition/enum_trailing.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
 #include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/arithmetic/inc.hpp>
 #include <boost/preprocessor/repetition/repeat.hpp>
@@ -70,9 +72,8 @@ public:
                                                          mpp_TrailingArgTypes())> Function;
 
 #   define mpp_l(z,n,d)                                                                           \
-        typedef typename boost::remove_const<                                                     \
-            typename boost::remove_reference< typename traits::mpp_ArgTypeN(n) >::type >::type    \
-                mpp_ArgTypeN(n);
+        typedef typename senf::remove_cvref< typename traits::mpp_ArgTypeN(n) >::type             \
+            mpp_ArgTypeN(n);
     BOOST_PP_REPEAT( BOOST_PP_ITERATION(), mpp_l, _ )
 #   undef mpp_l
 
@@ -168,6 +169,19 @@ struct CreateParsedCommandOverload<Traits, true, BOOST_PP_ITERATION()>
 };
 
 // ////////////////////////////////////////////////////////////////////////
+#elif BOOST_PP_ITERATION_FLAGS()==5 // ////////////////////////////////////
+// ////////////////////////////////////////////////////////////////////////
+
+// Create keyword arg forwarding functions
+
+template <BOOST_PP_ENUM_PARAMS( BOOST_PP_ITERATION(), class A ) > 
+next_type arg ( BOOST_PP_ENUM_BINARY_PARAMS( BOOST_PP_ITERATION(), A, const & a ),
+                typename arg_params::match< BOOST_PP_ENUM_PARAMS( BOOST_PP_ITERATION(), A ) >::type
+                    kw = arg_params()) const {
+    return argInfo( kw(BOOST_PP_ENUM_PARAMS( BOOST_PP_ITERATION(), a )) );
+}
+
+// ////////////////////////////////////////////////////////////////////////
 #endif // /////////////////////////////////////////////////////////////////
 // ////////////////////////////////////////////////////////////////////////
 // Undefine local Macros