
AMDG On 07/18/2012 09:54 AM, Vicente Botet wrote:
Vicente Botet wrote
Steven Watanabe-4 wrote
AMDG
On 07/18/2012 06:57 AM, Larry Evans wrote:
On 07/18/12 01:29, Vicente J. Botet Escriba wrote:
Hi,,
In the example from the doc
http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/...
typedef mpl::vector< copy_constructible<_a>, copy_constructible<_b>, copy_constructible<_c>, constructible<_a(const _b&, const _c&)> > construct;
std::vector<double> vec; int i = 10; double d = 2.5; tuple<construct, _a&, _b, _c> t(vec, i, d); any<construct, _a> v(get<1>(t), get<2>(t));
I don't see which type is constructed and stored in v and how this type is given. That is I don't see how _a is binded. Could you help me?
<snip>
Sorry I wanted to say, how the bind of _a to std::vector<double> *is know by v* if the t variable is not passed in the constructor of any?
Each any<> stores a complete vtable. i.e. any<construct, _b> knows what _a, _b, and _c all bind to. In Christ, Steven Watanabe