
Hello, All!
I write simple code:
=============mpl_enum.cpp=============
#include
range;
int main() {
boost::mpl::for_each<range>(f);
return 0;
}
=============mpl_enum.cpp=============
MSVC 7 (ver 13.00.9466)
=============Command Line==============
c:\cl /EHsc /GR /Zc:wchar_t /Zc:forScope /nologo mpl_enum.cpp
=============Command Line==============
=============Output=====================
mpl_enum.cpp
C:\Lang\Projects\boost\boost\mpl\aux_\integral_wrapper.hpp(78) : error
C2440: 'return' : cannot convert from '' to 'test_e'
Conversion to enumeration type requires an explicit cast
(static_cast, C-style cast or function-style cast)
C:\Lang\Projects\boost\boost\mpl\aux_\integral_wrapper.hpp(78) :
while compiling class-template member function
'boost::mpl::integral_c

"nagual"
Hello, All!
I write simple code: =============mpl_enum.cpp============= #include
#include #include <iostream> enum test_e {ONE, TWO, THREE};
void f(test_e e) { const char* names[] = {"ONE", "TWO", "THREE"}; std::cout<
typedef boost::mpl::range_c< test_e, ONE, static_cast
(THREE + 1) range;
int main() { boost::mpl::for_each<range>(f); return 0; }
=============mpl_enum.cpp=============
MSVC 7 (ver 13.00.9466) =============Command Line============== c:\cl /EHsc /GR /Zc:wchar_t /Zc:forScope /nologo mpl_enum.cpp =============Command Line============== =============Output===================== mpl_enum.cpp C:\Lang\Projects\boost\boost\mpl\aux_\integral_wrapper.hpp(78) : error C2440: 'return' : cannot convert from '' to 'test_e' Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
[snip more errors] Hmm, looks like a bug to me. Fixed in the CVS main trunk (the diffs are attached, in case you would like to fix it locally - currently it takes up to 24 hours for anonymous CVS servers to reflect the changes). Thanks for the report! Aleksey
participants (2)
-
Aleksey Gurtovoy
-
nagual