diff --git a/dispatchkit/proxy_constructors.hpp b/dispatchkit/proxy_constructors.hpp index e66edcf..ca59884 100644 --- a/dispatchkit/proxy_constructors.hpp +++ b/dispatchkit/proxy_constructors.hpp @@ -8,23 +8,8 @@ #include #include -namespace dispatchkit -{ - template - boost::shared_ptr constructor() - { - return boost::shared_ptr(new Class()); - } - template - boost::function ()> build_constructor() - { - typedef boost::shared_ptr (*func)(); - return boost::function ()>(func(&(constructor))); - } -} - -#define BOOST_PP_ITERATION_LIMITS ( 1, 10 ) +#define BOOST_PP_ITERATION_LIMITS ( 0, 10 ) #define BOOST_PP_FILENAME_1 "proxy_constructors.hpp" #include BOOST_PP_ITERATE() # endif @@ -33,17 +18,17 @@ namespace dispatchkit namespace dispatchkit { - template + template boost::shared_ptr constructor( BOOST_PP_ENUM_BINARY_PARAMS(n, Param, p) ) { return boost::shared_ptr(new Class( BOOST_PP_ENUM_PARAMS(n, p) )); } - template + template boost::function (BOOST_PP_ENUM_PARAMS(n, Param))> build_constructor() { typedef boost::shared_ptr (*func)(BOOST_PP_ENUM_PARAMS(n, Param)); - return boost::function (BOOST_PP_ENUM_PARAMS(n, Param))>(func(&(constructor))); + return boost::function (BOOST_PP_ENUM_PARAMS(n, Param))>(func(&(constructor))); } }