Boost logo

Boost :

From: Daniel James (daniel_at_[hidden])
Date: 2004-08-21 11:15:51


Hi,

The attached patch improves the type traits library on Digital Mars.
Mostly it just selects the correct code to be used, the only new code is
a new version of boost::is_convertible. Using '...' to overload the
conversion check works really badly, so I experimented with different
ways of trying to get it to select the right overload, and found one
that mostly works. You can see it in the patch. Also, when using static
cosnt values it can sometimes cause '_m_from' to get instantiated -
causing a link error. To work round this, it uses enums.

With this patch applied there are still the following problems:

The compiler has trouble with const and volatile modifiers on voids and
arrays in template variables. So it gets a lot of the tests involving
these types wrong.

The compiler allows some conversions that it shouldn't. For example, it
only warns about binding temporaries to non-const references, instead of
causing an error. So, in these cases is_convertible is true. Would it be
worth adding checks for these cases?

is_abstract doesn't work.

is_base_and_derived uses the 'broken' implementation, based on
is_convertible.

The test tricky_is_enum_test fails to compile.

Daniel




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