
5 Mar
2009
5 Mar
'09
5:38 p.m.
Phil Endecott a écrit :
- How about avoiding the _START/_END stuff with e.g. BOOST_SCOPED_ENUM_DECL(algae, green,red,cyan); (I had been under the impression that varargs macros were a gcc-ism, but I've recently discovered that they're in c99; do non-gcc C++ compilers generally allow them? I don't think we can get away with allowing only up-to-N elements in this case.)
Evenif variadic macro is not supported, Boost::Preprocessor sequence can : BOOST_SCOPED_ENUM_DECL(algae, (green)(red)(cyan) ); or Boost::Preprocessor array BOOST_SCOPED_ENUM_DECL(algae, (3,(green,red,cyan) ); -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35