Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPL] HAS_XXX gives the wrong answer after "enable_if" on incomplete type in GCC 4.6/7
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-12-18 17:28:22


> I've run into an unexpected behaviour, and I'm not sure if the
> compiler has a bug, if Boost.MPL has a bug, or if I have the wrong
> expectations. I am using Boost v1.49.0, but I also tested r82084 of
> the Boost trunk.

I'm not sure which is the case either, but notice that a simple
workaround is to define f after traitor_1 is complete (you can still
*declare* f where you do now). This is not an unreasonable
requirement, because the body of f performs a traitor_1 -> C
conversion, for which it needs to instantiate the constructor of C,
for which it needs to instantiate has_traitor<traitor_1>, which only
gives accurate results if traitor_1 is complete.

Regards,
Nate
                                               


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