Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2004-05-29 11:36:11


On 5/27/04 5:14 AM, "Joaquín Mª López Muñoz" <joaquin_at_[hidden]> wrote:

[SNIP]
> Maybe the following is a good compromise
>
> #if defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
> enum npos_type { npos = (size_type)-1 }
> #else
> static const size_t npos = (size_type)-1;
> #end

Doesn't the BOOST_STATIC_CONSTANT macro cover this?

> This would work for any compiler except those compilers for which
>
> * there are problems with enums that should be greater than an unsigned int,
> AND
> * BOOST_NO_INCLASS_MEMBER_INITIALIZATION is defined.
[TRUNCATE]

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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