Boost logo

Boost :

Subject: Re: [boost] [type_erasure]any(const binding<Concept>&, ...) compile error
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-07-26 14:50:23


On 07/26/12 11:21, Larry Evans wrote:
> On 07/26/12 09:57, Steven Watanabe wrote:
>> AMDG
>>
>> On 07/26/2012 07:40 AM, Larry Evans wrote:
>>> On 07/26/12 09:02, Steven Watanabe wrote:
>>>> On 07/26/2012 05:29 AM, Larry Evans wrote:
>>>>
>>>> The concept doesn't contain anything that
>>>> matches an argument of type value<_a>.
>>>>
>>> Then why isn't a similar compile error produced when b_any is
> constructed?
>>>
>>
>> This calls a different constructor which
>> has different requirements. Have you
>> read the reference for any? I tried
>> to cover the constructors thoroughly.
>
> My mistake. I didn't notice:
>
>
> http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/doc/html/boost/type_erasure/any.html#id2445089-bb
>
> had:
>
> Concept must contain a matching instance of constructible.
>
> However, in my defense, I couldn't see any reason why,
> if:
>
> any<Concept,_a> a_any
>
> can be created with static_map<Concept>, it couldn't be
> created with a binding<Concept>; thus, I guess I just
> glossed over the any.html#id2445089-bb doc.
>
> BTW what *is* the reason for the restriction on the Concept in the
> binding<Concept> CTOR. It's obviously not needed for creating
> an instance of AnyA with a value<_a>::type even when ConceptAB does
> not "contain a matching instance of constructible".
>
[snip]
If detail/construct.hpp is changed as in the attached,
then the compile problem in the attached goes away.

Is there any reason why construct.hpp shouldn't be
changed as shown in the attached?

-regards,
Larry





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk