Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-09 19:26:57


The following program produces two "ambiguous conversion" errors, as I
expected it to:

struct A {};
struct B : A {};
struct C : A {};
struct D : B, C {};
bool const x = boost::is_base_and_derived<A,D>::value;
bool const y = boost::is_convertible<D*,A*>::value;

...but the type_traits documentation gives no indication that these
constructs can produce compiler errors.

Also, there is a note that is_convertible is broken for Borland, but no
mention that both is_convertible and is_base_and_derived are broken on
Metrowerks.

-Dave

===================================================
  David Abrahams, C++ library designer for hire
 resume: http://users.rcn.com/abrahams/resume.html

        C++ Booster (http://www.boost.org)
          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