|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-10-02 11:53:15
Romain Lerallut <rlerallut_at_[hidden]> writes:
> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net