Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-02-05 06:39:23

Paul Mensonides wrote:
> [deep breath]
> I think that he thought that you might have thought that the
> cv-qualified specializations would match
> pointers-to-cv-qualified-member-functions rather than just
> cv-qualified-pointers-to-members.

Yes, exactly. Apologies for the confusion. It is a common mistake to provide
only R T::* and expect that to match all pointers to members. To get back to
your earlier post,

int (X::*pf) () const;

is not the same as

typedef int (*F) () const;
typedef F X::* pf;

since the first typedef is ill-formed, function types cannot be

The only way for R T::* to match pf is R = int (*) (), T == X const, but I
don't think that compilers do that.

Either way, it seems that you meant what you said, i.e. cv-qualified
pointers to members. Sorry for the noise.

Boost list run by bdawes at, gregod at, cpdaniel at, john at