Packets: Fix VariantParser invalid parser access bug
[senf.git] / Utils / type_traits.mpp
index 8648d7a..7681a97 100644 (file)
@@ -35,6 +35,7 @@
 #include <boost/preprocessor/punctuation/comma_if.hpp>
 #include <boost/preprocessor/arithmetic/dec.hpp>
 #include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
 
 // ///////////////////////////mpp.p////////////////////////////////////////
 #elif BOOST_PP_IS_ITERATING // ////////////////////////////////////////////
@@ -71,14 +72,19 @@ struct member_class<RV (C::*)(BOOST_PP_ENUM_PARAMS( BOOST_PP_ITERATION(), A ))>
     typedef C type;
 };
 
+template <class Traits>
+struct function_traits_arg_type<Traits, BOOST_PP_ITERATION(), true>
+{
+    typedef typename Traits::mpp_Arg(BOOST_PP_ITERATION()) type;
+};
+
 // ////////////////////////////////////////////////////////////////////////
 #endif // /////////////////////////////////////////////////////////////////
 // ////////////////////////////////////////////////////////////////////////
 // Undefine local Macros
 
-#undef mpp_Args
-#undef mpp_Args_
-
+#undef mpp_OtherArgs_
+#undef mpp_OtherArgs
 #undef mpp_Arg
 
 // ////////////////////////////////////////////////////////////////////////