"Paul Mensonides" <[EMAIL PROTECTED]> writes: > Is this well-formed: > > struct X { > typedef void func_t(int); > func_t member; > }; > > void X::member(int) { > return; > } > > What about: > > struct X { > typedef void func_t(int) const; > // ^^^^^ > func_t member; > }; > > void X::member(int) const { > return; > } > > This is the root of my question: > > template<class> struct test; > > template<class R, class C> struct test<R C::*> { > typedef R type; > }; > > struct X { }; > > test< void (X::*)(int) >::type // what type is this? > > Is it a function type, or is it a "member function type"?
If it's legal, it's a function type. Interestingly, MWCW seems to think it's: void (void *const , const void *const , int) But none of the other compilers seem to think it's a function type. I know that when Howard mentioned that he thought it was natural to get a function type by stripping the "pointer to member" part from a pointer to member function in some committee discussion, it generated a little bit of surprisee at least. I can't tell what EDG thinks it is, but whatever it is, it's not a function type. GCC thinks it's illegal. -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost