Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-24 08:12:24


From: "John Maddock" <John_Maddock_at_[hidden]>
> >I just came across a repeated need for add_cv<T>. We already have
> >remove_cv<T>. How about it, for symmetry?
>
> I don't mind ading it, but remember that such a beast doesn't actually do
> anything:
>
> add_cv<T>::type
>
> is always the same as:
>
> T const volatile
>
> for all T.

True in standard C++, but false in the Borland dialect:

typedef int const volatile T;

typedef T const volatile U;

int main()
{
}

Error E2361 testbed.cpp 3: 'const' has already been included
Error E2361 testbed.cpp 3: 'volatile' has already been included
*** 2 errors in Compile ***

--
Peter Dimov
Multi Media Ltd.

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