Subject: Re: [boost] [TypeErasure] Forward constructors and binded types
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-07-19 10:55:14
On 07/19/2012 07:36 AM, Larry Evans wrote:
> 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
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:
> 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:
> supporting the above conclusion.
> Do the docs say anywhere that this is what
> happens when 2 different bindings are used
> to construct something?
"The bindings of all the arguments that are any's, must be the same."
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk