template copy constructor in boost::any
I am confused with these codes in any.hpp of boost.
template<typename ValueType>
any(const ValueType & value)
: content(new holder<
BOOST_DEDUCED_TYPENAME remove_cv<BOOST_DEDUCED_TYPENAME decay<const ValueType>::type>::type
>(value))
{
}
any(const any & other)
: content(other.content ? other.content->clone() : 0)
{
}
It's clear that for the sencod copy-constructor is useful when I need a new any object from another object. But when the first copy-constucted will be executed?