|
Boost : |
From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2004-05-27 07:20:49
Toon Knapen ha escrito:
> Joaquín Mª López Muñoz wrote:
>
> > 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
>
> Well currently BOOST_NO_INCLASS_MEMBER_INITIALIZATION is defined for the
> latest version of vacpp (version 6) too so I would suggest just for the
> time being do
>
> #if defined(__IBMCPP__)
> // VisualAge compiler can't handle 64 bit enums
> static const size_t npos = -1 ;
> #else
> enum npos_type { npos = (size_type)-1 } ;
> #endif
>
How come this works if
BOOST_NO_INCLASS_MEMBER_INITIALIZATION tells
us otherwise?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk