|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2008-01-20 05:00:53
Richard Webb wrote:
> I've been running the Boost regression tests against VC9 with the
> beta TR1 feature pack, and raising some of the failures as bugs with
> MS.
>
>> From reading the standards, it seems that some of the test failures
>> are in areas
> which have changed over time. The MS blog post @
> <http://tinyurl.com/3b9ksc> mentions N2157 (
> http://tinyurl.com/2r54lo ), so i assume that they're working on at
> least that revision.
>
> So, from the tests:
>
> -tr1_is_base_of_test (http://tinyurl.com/2hzmae) is failing because
> Boost thinks is_base_of<int, int> should be true and VC9 says it's
> false.
> n2157 has the example "is_base_of<int, int>::value // false", so
> VC looks correct here.
Sigh... it depends, as far as TR1 is concerned this started out false, and
then changed to true (in the final TR1 draft N1836 anyway). However, the
std whitepaper has for the moment anyway changed it back again... well sort
of anyway.
> -tr1_is_convertible_test (http://tinyurl.com/2dortk) has 2 sets of
> failures:
>
> 1) is_convertible<float,void>/is_convertible<void,void> are both
> false, and Boost expects both to be true.
That's explicitly stated in the TR1.
> n2157 says "If To and From are void types, the result is true.
> However if only one of To or From is a void type, then the result is
> false", which is a change to the spec.
Again this depends on whether you are tracking the latest WP or the TR1.
> In this case, both Boost and VC9 seem to be wrong in one case.
>
> 2)is_convertible<float,convertible_from<float&>>
> is_convertible<char,convertible_from<char&>>
> are both false.
> n2157 says "Given a type T, the TR1 is_convertible<T, T&>::value is
> true whereas this paper proposes false unless T is a non-volatile but
> const qualified type", which sounds like VC is correct here.
That's a different situation,
is_convertible<float,convertible_from<float&>>
and
is_convertible<float,float&>
are two different beasts, but again I suspect this depends on whether you
implement TR1 or track the latest std WP (which I believe can't be
implemented without rvalue references).
HTH, John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk