Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-08-21 03:23:13


Edson Tadeu wrote:
> When I try to use is_convertible<T, int>::value, with T being a
> boost::assign::list_of, it wrongly results in a "true" value.

is_convertible can't care the function body.
In this case, it looks into conversion operator of list_of,
then says "true".
This behavior seems unavoidable in current C++.
In fact, you can easily find a type which doesn't exactly work with is_convertible.
e.g. shared_ptr.

Regards,

-- 
Shunsuke Sogame

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