Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-05-10 07:25:00


----- Original Message -----
From: "Gennadiy Rozental" <rogeeff_at_[hidden]>
Newsgroups: gmane.comp.lib.boost.devel
To: <boost_at_[hidden]>
Sent: Friday, May 10, 2002 7:59 AM
Subject: [boost] Re: is_convertible: bug or missing feature?

> BTW, (it was probaby already discussed, and I just miss it)
> Why couldn't we implement is_convertible like this:
> struct convertible
> {
> template<typename From>
> struct from
> {
> template<typename To>
> struct to
> {
> enum { value = .... };
> };
> };
> };
>
> The usage would be more expressive:
> is_convertible::from<Type1>::to<Type2>::value

Notice that the correct syntax would have to be:

is_convertible::from<Type1>::template to<Type2>::value

which, IMO, is enough to make it unreadable.

Giovanni Bajo


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