On Tue, 04 Feb 2003 23:10:39 +0100, Paul Mensonides wrote: > Daniel Frey wrote: > >>> Yes, I worded that incorrectly. I should have said: are you thinking >>> that the above will match >>> >>> int (X::*pf)(long, double) const; >> >> I'm not absolutely sure, but I think that this creates a non-const >> pointer to a const member function. As far as I understand it, this is >> equivalent to: >> >> typedef int ft( long, double ) const; ft X::* pf; > > Yes, the type of 'pf' is: > > int (X::*)(long, double) const; > >> To create something that matches to above specialization, you have to >> do something like this: >> >> ft X::* const cpf; > > I might be misunderstanding you, but the above does not match the type > "int (X::*)(long, double) const." E.g. if I have this template:
I think you misunderstood me. I should have made it clearer what I was refering to when I wrote "matches the above specialization". By this I was refering to Peters question to find something that is taken by the template< class C, typename T > struct is_member_function_pointer< T C::* const > { enum { value = is_function< T >::value }; }; specialization I provided. At least that is how I understood him. > As I said, I may be misunderstanding you. If so, just consider it a > clarification for everyone else. As is, the four specializations that > you provided with catch any unqualified (first one) or qualified (other > three) pointer-to-member. The nested call to 'is_function' should yield > true if the pointed-to type a function type (cv-qualified or otherwise). Yes. My problem is that I still don't understand what Peter is trying to show and that makes me kind of nervous :) Regards, Daniel _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost