
21 Aug
2007
21 Aug
'07
7:23 a.m.
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