Problem with is_class and is_enum
In the following code, struct foo2 is mistakenly taken for an enum, which
breaks is_class, which leads to some unfortunate problems in boost::python.
Problem appears on both Boost 1.30.0 and a one-month old CVS checkout, using
gcc 3.3.2 and 2.95 and Intel icc 7.1 for linux.
I have tried specializing 'is_enum', setting it by hand to return 'false',
but though it works for this simple case, it does no good when the call to
is_enum is buried deep inside boost.
I rely heavily on being able to do these implicit conversions for foo2, so if
anyone has an idea on how to make this work, it would be great.
Thanks in advance,
Romain
----------------------------------------------------------------
#include
Romain Lerallut
In the following code, struct foo2 is mistakenly taken for an enum, which breaks is_class, which leads to some unfortunate problems in boost::python.
Problem appears on both Boost 1.30.0 and a one-month old CVS checkout, using gcc 3.3.2 and 2.95 and Intel icc 7.1 for linux.
I have tried specializing 'is_enum', setting it by hand to return 'false', but though it works for this simple case, it does no good when the call to is_enum is buried deep inside boost.
I rely heavily on being able to do these implicit conversions for foo2, so if anyone has an idea on how to make this work, it would be great.
I can check in a fix for ICC 7.1, but I'm afraid GCC (3.2 at least) is incapable of detecting that this is not an enum, due to bugs in the compiler (lack of SFINAE). Specializing is_enum is your best bet there. Sorry, -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams
-
Romain Lerallut