
AMDG On 07/19/2012 07:36 AM, Larry Evans wrote:
http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/...
was most helpful to me. The attached shows that 2 different bindings can be used to create 2 arguments to a construction of the 3ird placeholder, and it still works. I would have thought that the same bindings would have been required for the placeholders.
They are. This happens to work because I cheated a little in the assertions, but it's really undefined behavior.
The attached produces output of:
St5dequeIdSaIdEE
suggesting the type constructed comes from the 1st placeholder. When the code is changed to:
any<construct, _b> size(10, bindings1); any<construct, _c> val(2.5, bindings2);
the output is:
St6vectorIdSaIdEE
supporting the above conclusion.
Do the docs say anywhere that this is what happens when 2 different bindings are used to construct something?
http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/... "The bindings of all the arguments that are any's, must be the same." In Christ, Steven Watanabe