Subject: Re: [boost] [type_erasure]any(U,static_binding) stores wrong type
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-07-29 11:06:00
On 07/29/12 09:48, Larry Evans wrote:
> On 07/29/12 08:06, Larry Evans wrote:
>> When the attached is run, it produces output:
>> creating a_fst from a_ctor_arg
>> 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.
OOPS again, because a ph_ctor_arg_type *is* a suitable arg to
ph_erasee_type. Maybe the requirement should just be:
U is same as mpl::at<Map, Tag>::type where Tag is 2nd
template arg to the any being constructed
and U is a model of Concept.
I think that would cover all the cases; however, it's
still worrisome that no diagnostic is provided when
U is something other than mpl::at<Map,Tag>::type.
Am I missing something?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk