
On 07/29/12 08:06, Larry Evans wrote:
When the attached is run, it produces output:
./static_binding.exe std::is_copy_constructible<ph_erasee_type>=0 53:ph_ctor_arg<boost::type_erasure::_a>::CTOR.default:my_instance=0 creating a_fst from a_ctor_arg 64:ph_ctor_arg<boost::type_erasure::_a>::CTOR.copy:my_instance=1:(void*)this=0x66ab50 :*fst_cast=ph_erasee<boost::type_erasure::_a>.my_instance=0:(void*)fst_cast=0x66ab50 dynamic_cast<ph_ctor_arg_type*>(value_base_ptr)=0x66ab50 dynamic_cast<ph_erasee_type*>(value_base_ptr)=0
Indicating that a ph_ctor_arg_type is being stored in a_fst instead of the expected ph_erasee_type.
OOPS, reading more closely the requires from: it says: U is a model of Concept. and obviously ph_ctor_arg_type is not because it occurs nowhere in ConceptA; however, it would be clearer if the requirement were: U is a suitable argument to the copy constructor for mpl::map<Map, Tag>::type, where Tag is the 2nd template arg to the any to be constructed. -regards, Larry