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


  David Abrahams, C++ library designer for hire

        C++ Booster (
          email: david.abrahams_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at