[boost any] casting problems (BUG?)
Hello *,
I would like to ask the developers of boost::any if the ctor template in
boost::any
template<typename ValueType>
any(const ValueType & value)
: content(new holder<ValueType>(value))
{
}
is intentionally not marked as explicit. Today using boost::any_cast and
with a std::map (mapping of some id to boost::any) iterator I was wondering
why I got an exception when I found a correct any instance.
My code looked like:
map_type::const_iterator iter = map.find(Key);
if(map.end()!=iter)
return boost::any_cast
On 29/01/2008, Ovanes Markarian
Hello *,
I would like to ask the developers of boost::any if the ctor template in boost::any
template<typename ValueType> any(const ValueType & value) : content(new holder<ValueType>(value)) { }
is intentionally not marked as explicit.
The developer of boost::any isn't active on this list nowadays. But here's a post where he explains this, a long discussion followed: http://lists.boost.org/Archives/boost/2004/02/61713.php Daniel
participants (2)
-
Daniel James
-
Ovanes Markarian