It appears that an enum cannot be default constructed in the way that tuple
does,
cons() : head(), tail() {}
Any idea on how to get around this (besides using an int in the tuple)?
Thanks,
Tom
#include
#include <string>
enum Foo { Willis, Arnold };
void test()
{
boost::tuple a;
}
/usr/local/eddynet/opt/include/boost/tuple/detail/tuple_basic.hpp: In method
`boost::tuples::cons::cons () [with HT = Foo, TT = boost::tuples::cons]':
/usr/local/eddynet/opt/include/boost/tuple/detail/tuple_basic.hpp:454:
instantiated from `boost::tuples::tuple::tuple () [with T0 = Foo, T1 = string, T2 = boost::tuples::null_type, T3
= boost::tuples::null_type, T4 = boost::tuples::null_type, T5 =
boost::tuples::null_type, T6 = boost::tuples::null_type, T7 =
boost::tuples::null_type, T8 = boost::tuples::null_type, T9 =
boost::tuples::null_type]'
tuple_enum_test.cpp:8: instantiated from here
/usr/local/eddynet/opt/include/boost/tuple/detail/tuple_basic.hpp:263:
cannot convert `int' to `Foo' in
assignment
</error>
-----------------------------------------------------------------------
DISCLAIMER: Information contained in this message and/or
attachment(s) may contain confidential information of Zetec, Inc.
If you have received this transmission in error, please notify
the sender by return email.
-----------------------------------------------------------------------