Subject: Re: [boost] [type_erasure]any(const binding<Concept>&, ...) compile error
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-07-27 15:27:10
On 07/27/2012 11:54 AM, Larry Evans wrote:
> On 07/27/12 13:08, Steven Watanabe wrote:
>> You're passing an argument of type ph_value<_a>.
>> How would constructible<_a(const _a&)> (which
>> is the copy constructor) be viable?
> Because, when _a in constructible<_a(const _a&)> is replaced by the
> binding, it becomes, IIUC,
> constructible<ph_value<_a>(const ph_value<_a>&)>
This substitution happens in the dispatching layer.
In the interface of any, constructible<_a(const _a&)>
defines the constructor:
any<C, _a>::any(any<C, const _a&>);
It can't possibly define
any<C, _a>::any(const ph_value<_a>&);
because it doesn't know about ph_value<_a>.
> and this is the same as the compiling version of binding_of.cpp.
> I thought this replacement is what would happen based on the example:
> constructible<_a(const _b&, const _c&)>
> Why is the replacement done in the construction.html example and not
> in bindings_of.cpp? Hmmm... Ok, the example has any args, from which
> the bindings<ConceptA> can be gotten. But those same bindings are
> available from the binding<ConceptA> arg in bindings_of.cpp creation
> of a_dup.
> Obviously I'm still missing something, but I've no clue what :(
The library deals with either any's or
with the contained types, but not both,
depending on what layer you're looking at.
You're trying to mix the two.