Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-02-04 09:21:16


Peter Dimov wrote:
>
> From: "Daniel Frey" <daniel.frey_at_[hidden]>
> > Peter Dimov wrote:
> > >
> > > Are you sure that "T C::* const" is a type?
> >
> > Isn't it? It's a constant pointer to a member of class C. T may be the
> > type of a member variable or (although GCC don't detect it) a function
> > type. At least this is my current understanding. Do you have a reason to
> > ask about it? I think so, but I can't see it...
>
> 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;

To create something that matches to above specialization, you have to do
something like this:

ft X::* const cpf;

Anyway, what is the point of this? I specialize for a pointer and
pointers can be cv-qualified, thus to be complete I have to provide
specializations for all cv-versions, haven't I?

Regards, Daniel

-- 
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk