Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-14 22:47:48


Please ignore my previous mis-post on type_traits and read this one!
Thanks,
Dave

---------

1. With various windows compilers I have at my disposal, the type_traits
library tests are reporting unexpected failures. For example:

Intel C++ 5.0 atop VS6:

*
***************** failed above test: arithmetic_traits_test
********************
128 tests completed, 12 failures found, 0 failures expected from this
compiler.

Intel C++ 6.0 atop VS.NET:

*
***************** failed above test: arithmetic_traits_test
********************
128 tests completed, 12 failures found, 0 failures expected from this
compiler.

msvc6: no unexpected errors
vc7.0: no unexpected errors, 1 warning

metrowerks CWPro7.2:

*
***************** failed above test: object_type_traits_test
********************
201 tests completed, 21 failures found, 19 failures expected from this
compiler.

mingw (2.95.2): no unexpected errors
cygwin gcc 3.0.4: 2 warnings, no unexpected errors.
Borland 5.5.1: several warnings, no unexpected errors.

2. I am still really confused by the relationship the expected failures
numbers in the test .cpp files have to the number of expected failures
actually reported. They don't seem to match up. I am also confused about
what the methodology should be for deciding that a test failure is
"expected", and what our response should be when unexpected failures
show up. I know we talked about this before, but I never got clear.
What's the procedure to be?

3. A few of the tests seem to rely on non-conforming behavior:
is_convertible<T,U>::type should not compile on a conforming compiler
when T is non-copyable, but most compilers seem to accept it anyway. The
major culprits are:

    is_class: I replaced it with a conforming version that works for
    non-copyable and incomplete types, but unfortunately enough
compilers
    seem to have trouble with this implementation that it's only enabled
    for CWPro8+ and MSVC7+

    is_empty: This is really strange; there's a check for
    is_convertible<r_type,int> in the implementation which doesn't seem
    to affect the results *at all*! John M., I presume there's a
    compiler which needed this test somewhere, but it seems to me that
    compiler should either fail the test for some types, or should have
    a specific workaround. There's no reason we shouldn't be able to
check
    whether non-copyable types are empty on a conforming implementation!

4. That leaves us with one failure for CWPro8:

    checking value of (boost::is_convertible<int*,
int[2]>::value)...failed

It's not clear to me that this one should really succeed. How do you
convert a pointer to int into an array of two ints?

-Dave

+---------------------------------------------------------------+
                  David Abrahams
      C++ Booster (http://www.boost.org) O__ ==
      Pythonista (http://www.python.org) c/ /'_ ==
  resume: http://users.rcn.com/abrahams/resume.html (*) \(*) ==
          email: david.abrahams_at_[hidden]
+---------------------------------------------------------------+


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