Boost logo

Boost :

From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2007-05-24 12:01:53


shunsuke skrev:
> Thorsten Ottosen wrote:
>> shunsuke skrev:
>>> Thorsten Ottosen wrote:
>>>>> Well, one thing I am a little worried about is that
>>>>> 'boost::iterator_range' doesn't work with 'boost::is_convertible'.
>>>> Could you explain please?
>>> is_convertible< int, iterator_range<char *> > returns "true".
>>>
>> ok, so it works afterall, you're just not satisfied with the answer :-)
>>
>> I guess this is because we can say
>>
>> iterator_range<...> r = ...;
>> if( r )
>> {
>> ...
>> }
>>
>> What is your problem with that?
>
> I meant
>
> is_convertible<
> *AnyType*, // From
> iterator_range<char *> // To
>
> returns "true".

I'm not sure why is_convertible<> behaves like that, I dont recall
having done any thing to support that explicitly.

Anyway, what is the problem? AFAICT, it happens for all class with a
non-explicit templated constructor.

-Thorsten


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