
Thorsten Ottosen <thorsten.ottosen <at> dezide.com> writes:
Den 08-05-2011 16:18, Joaquin M Lopez Munoz skrev:
Joaquin M Lopez Munoz<joaquin<at> tid.es> writes:
I'm afraid this is impossible. What would the type be for the first template paramater of ordered_unique?
Sorry, I meant "first non-template parameter".
Well, I thought c++11 would allow us to deduce return type, argument types and class type of a member function pointer.
Wouldn't
http://www.boost.org/doc/libs/1_46_1/libs/function_types/doc/html/boost_func...
help?
You can decompose a pointer to member *type* into its constituents easily enough (even in C++98), but when you write ordered_unique<&foo::x> the entity passed to ordered_unique is not a *type* but a pointer (to a member). That's why you need decltype to do the object-->type magic, and that's why the syntax you propose can't work. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo