|
Boost : |
From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2006-03-13 14:11:39
While trying to port Boost.Python to HP-UX using the native "aCC" compiler I
ran into this issue:
void foo()
{
enum udt_builtin_mixture_enum
{
builtin_to_builtin
,builtin_to_udt
,udt_to_builtin
,udt_to_udt
} ;
udt_builtin_mixture_enum value1 = builtin_to_builtin; // this works
udt_builtin_mixture_enum value2 = 0; // this doesn't
}
% aCC -AA -c enum_init.cpp
"enum_init.cpp", line 11: error #2144: a value of type "int" cannot be used to
initialize an entity of type "udt_builtin_mixture_enum"
udt_builtin_mixture_enum value2 = 0;
^
1 error detected in the compilation of "enum_init.cpp".
Is the compiler correct in rejecting the initialization with 0?
Thanks!
Cheers,
Ralf
P.S.: aCC: HP aC++/ANSI C B3910B A.06.01 [Jan 05 2005]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk