Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-01-31 10:58:56


I don't believe that this "fix" works. I think you forgot about user-defined
implicit conversions (i.e. conversion operators and non-explicit
constructors taking a single argument).

Also, I think I mentioned that now CodeWarrior reports:
std::random_access_iterator_tag>::value is false.

----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, January 30, 2001 9:22 PM
Subject: [boost] is_convertible

> I found a workaround for the warning messages from is_convertible emmited
> by g++.
> The main problem was that g++ did not like passing non-POD objects through
> the elipses. So what I did was dispatch to a different test in the case
> when the type is a non-POD object. The different test uses conversion to
> void* instead of elipses for the fallback case when the types are not
> convertible.
> Some other things I had to fix to get this working:
> - added parenthesis around body of BOOST_IS_CLASS macro
> - a specialization of is_array to recognize const arrays
> In addition, I added a test case in type_traits_test.cpp that catches the
> original problem.
> The fixes have been checked in.
> Cheers,
> Jeremy
> ----------------------------------------------------------------------
> Jeremy Siek www:
> Ph.D. Candidate email: jsiek_at_[hidden]
> Univ. of Notre Dame work phone: (219) 631-3906
> ----------------------------------------------------------------------

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