On Mon, 30 Sep 2013 12:49:44 -0700, Jonathan Wakely
On 30 September 2013 20:22, Mostafa wrote:
I should have been more specific, bar is some member function of T. So in Foo:mybar, the goal is to reconstruct T::bar's paramtypes as "efficient types". That's what the other person's post was also referring to. So if a client passes the following struct as a template parameter to Foo:
struct ClientClass { static void bar(int const) { ... } };
You're presenting this class as having a function of that type, but it doesn't, your example is:
struct ClientClass { static void bar(int) { ... } };
the library is able to instantiate the following Foo::mybar
void Foo::mybar(int const & x) { ClientClass::bar(x); }
Why do you choose a different "efficient type" for an 'int' parameter vs a 'const int' parameter?
You're most likely reading this message out of context. If you start with Sergey's response it'll probably make more sense.