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
Hi Tom, Your code compiles fine with gcc 3.x and icc 6 (linux), so it may just be gcc 2.96 problem. Cheers, Jaakko On Wed, 28 Aug 2002, Tom Matelich wrote:
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. -----------------------------------------------------------------------
Yahoo! Groups Sponsor ADVERTISEMENT
Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
-- -- -- Jaakko Järvi email: jajarvi@cs.indiana.edu -- Post Doctoral Fellow phone: +1 (812) 855-3608 -- Pervasive Technology Labs fax: +1 (812) 855-4829 -- Indiana University, Bloomington
participants (2)
-
Jaakko Jarvi
-
Tom Matelich