[traits] Type of class of member function pointer

Dear all, perhaps more out of exercise, but does any of you know whether it is possible to get to the type of the class of a member function pointer? I.e., to somehow get to type T in "R (T::*)()"? (in this particular case, a member function without arguments in class T returning R)? Thanks a lot, Rutger

AMDG Rutger ter Borg wrote:
Dear all,
perhaps more out of exercise, but does any of you know whether it is possible to get to the type of the class of a member function pointer?
I.e., to somehow get to type T in "R (T::*)()"? (in this particular case, a member function without arguments in class T returning R)?
Look at the FunctionTypes library. In Christ, Steven Watanabe

perhaps more out of exercise, but does any of you know whether it is possible to get to the type of the class of a member function pointer?
I.e., to somehow get to type T in "R (T::*)()"? (in this particular case, a member function without arguments in class T returning R)?
Look at the FunctionTypes library.
I've skimmed over the doc, but still not found the weapon. :-( B/Rgds Max

AMDG Max wrote:
perhaps more out of exercise, but does any of you know whether it is possible to get to the type of the class of a member function pointer?
I.e., to somehow get to type T in "R (T::*)()"? (in this particular
case, a
member function without arguments in class T returning R)?
Look at the FunctionTypes library.
I've skimmed over the doc, but still not found the weapon. :-(
For member function pointers, the class is treated as the first argument.
boost::mpl::at_c

perhaps more out of exercise, but does any of you know whether it is possible to get to the type of the class of a member function pointer?
I.e., to somehow get to type T in "R (T::*)()"? (in this particular
case, a
member function without arguments in class T returning R)?
Look at the FunctionTypes library.
I've skimmed over the doc, but still not found the weapon. :-(
For member function pointers, the class is treated as the first argument. boost::mpl::at_c
>, 0>::type In Christ, Steven Watanabe
Cool! Thanks. I'll have a closer look at the doc and try to dissect the expression. B/Rgds Max
participants (3)
-
Max
-
Rutger ter Borg
-
Steven Watanabe