Boost logo

Boost :

Subject: Re: [boost] [config] polygon library MSVC8 portability - was long long portability
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2009-07-01 15:13:41


Michael Fawcett wrote:
> On Wed, Jul 1, 2009 at 1:52 PM, Simonson, Lucanus
> J<lucanus.j.simonson_at_[hidden]> wrote:
>>
>> Does someone know what specifically is different between MSVC8 and
>> MSVC9 wrt. SFINAE conformance?  I am shooting in the dark to reverse
>> engineer the bugs in the compiler that were fixed between MSVC8 and
>> 9.  There is a good chance that my library won't get backported to
>> MSVC8 without some guidance from the community.
>
> I'm sorry I don't know enough to help out, but both trunk and release
> test results show that enable_if passes all tests on 7.1, 8.0, 9.0,
> and 10.0. Are you sure it's a compiler bug?
>
> http://www.boost.org/development/tests/release/developer/utility-enable_if.html
> http://www.boost.org/development/tests/trunk/developer/utility-enable_if.html

Simple cases with enable_if doe work in MSVC8, but as the template parameters of enable_if get more elaborate with compile time logic metafunctions it breaks down in MSVC8 and not longer seems to work. I'm putting together a set of compilation tests that should all pass in MSVC9 but some of which fail in MSVC8 to try to empirically determine what works and what doesn't with MSVC8.

I am quite sure it is a compiler bug. Even MSVC9 has severe limitations due to a bug that prevents SFINAE from being effective in all but top level template instantiation, and the situation is apparently worse still with MSVC8 where even in top level instantiation SFINAE is not always effective.

I'll post the results of my testing to share my findings about what specifically is broken about SFINAE in MSVC8 that works in MSVC9 once the experiments are complete.

Regards,
Luke


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk