¡@

Home 

c++ Programming Glossary: foo_num_args

Any metaprogramming way to generate overloads for various numbers of template parameters?

http://stackoverflow.com/questions/5475046/any-metaprogramming-way-to-generate-overloads-for-various-numbers-of-template-pa

guard #define FOO_TEMPLATE_PARAMS BOOST_PP_ENUM_PARAMS FOO_NUM_ARGS class T #define FOO_PARAM J I D BOOST_PP_CAT T I BOOST_PP_CAT.. T I BOOST_PP_CAT a I #define FOO_PARAMS BOOST_PP_ENUM FOO_NUM_ARGS FOO_PARAM BOOST_PP_EMTPY #if FOO_NUM_ARGS 0 #define FOO_TEMPLATE.. BOOST_PP_ENUM FOO_NUM_ARGS FOO_PARAM BOOST_PP_EMTPY #if FOO_NUM_ARGS 0 #define FOO_TEMPLATE template FOO_TEMPLATE_PARAMS #else #define..