Boost logo

Boost :

Subject: [boost] [mpl] set_c with enums
From: Domagoj Saric (domagoj.saric_at_[hidden])
Date: 2009-10-01 09:13:40

void aFunction()
  enum AnEnum

  typedef boost::mpl::set_c<AnEnum, First, Fourth, Third> AnEnumSubSet;

  bool const exists
        boost::mpl::integral_c<AnEnum, Second>

the above code fails to compile in MSVC++ 9.0 SP1 and 10.0b1 with the
following error(s):
error C2440: 'specialization' : cannot convert from 'int' to

if the AnEnumSubSet definition is changed to use ...set_c<int... everything
compiles and works properly (the has_key statement can still use the
enum)...everything also works properly (with an enum) when using vector_c
and contains instead of set_c and has_key...

 "That men do not learn very much from the lessons of history is the most
important of all the lessons of history."
 Aldous Huxley 

Boost list run by bdawes at, gregod at, cpdaniel at, john at