Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2000-01-06 11:53:52


> >A few other changes were made (I include references to the Standard as to
> >why I think they should be this way):
> > . is_pointer returns false for cv-qualified types (3.9.2p3, 3.9.3p1)
>
> I find this counter-intuitive. I also reread these paragraphs and didn't
> interpret them to say that given this:
>
> int* p const;
>
> p is not a pointer.
>

The definition of "pointer" is given in 3.9.2p3
The first paragraph of 3.9.3p1 says "A type mentioned in 3.9.1 and 3.9.2 is
a cv-unqualified type. . ."

So this is the way I see it:
  "const int" is not an integral type (3.9.1p6), but
              is a scalar type (3.9p10)
  "int * const" is not a pointer type (3.9.2p3), but
                is a scalar type (3.9p10)
Note that:
  "const int" is a cv-qualified integral type
  "int * const" is a cv-qualified pointer type

Then again, maybe I'm wrong. . .

        -Steve


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