
Well, if you switch to functors, instead of functions I can offer you the following example ;) But I am unsure if it really suits your needs. #include <iostream> template<class T> struct function_template { void operator()(T value)const { std::cout << value << std::endl; } }; template<class T> struct other_function_template { void operator()(T value)const { std::cout << value*value << std::endl; } }; struct function_template_wrapper { template<class T, template<class> class Function> static inline void call(T value, Function<T> f = Function<T>()) { f(value); } }; int main(int argc, char* argv[]) { function_template_wrapper::call<int, function_template>(10); other_function_template<int> of; function_template_wrapper::call(10, of); } On Wed, May 30, 2007 08:54, Ares Lagae wrote:
my closest attempt is this:
[...]
-- Ares Lagae Computer Graphics Research Group, Katholieke Universiteit Leuven http://www.cs.kuleuven.be/~ares/
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
With Kind Regards, Ovanes Markarian