On Sep 29, 2013, at 11:00 PM, Mostafa
On Sun, 29 Sep 2013 14:44:52 -0700, Sergey Zhuravlev
wrote: Signature type int(int, const std::string) can be used as parameter for some compiletime algorithm. For example, algorithm that generate new signature type with optimal transfer arguments int (int, const std::string&) or generate signature with all argument references int (int&, const std::string&)
That was exactly the use case and the problem I had. Fortunately for me, I was able to specify the return type and parameters_type (as an mpl::vector) separately, which solved the issue. But I don't know if this is doable in general. For example, what does one do in the following scenario:
template <typename T> struct Foo { void mybar( // Construct efficient argument transfer signature for T::bar ) { T::bar(....); } };
without forcing the user to seperately specify T::bar paramtypes as a separate template parameter?
#include