
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/... 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".
A revised test driver(attached) uses double instead of value<_a> and value<_b> and it still produces the same error.
Why would that make a difference?
None, now that I've read the doc's more closely. Thanks for pointing me to which doc to read. [snip]