Boost logo

Boost :

Subject: Re: [boost] [TypeErasure] Forward constructors and binded types
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2012-07-18 13:47:18


Steven Watanabe-4 wrote
>
> AMDG
>
> On 07/18/2012 10:27 AM, Vicente Botet wrote:
>>
>>>>>>
>>>>>>> On 07/18/12 01:29, Vicente J. Botet Escriba wrote:
>>>>>>>> <snip>
>>>>>>>>
>>>>>>>> std::vector<double> vec;
>>>>>>>> int i = 10;
>>>>>>>> double d = 2.5;
>>>>>>>> tuple&lt;construct, _a&amp;, _b, _c&gt; t(vec, i, d);
>>>>>>>> any&lt;construct, _a&gt; v(get<1>(t), get<2>(t));
>>>>>>>>
>>>>
>>>> <snip>
>>
>> Please, could you point me to the any constructor used in
>>
>> any&lt;construct, _a&gt; v(get<1>(t), get<2>(t));
>>
>
> Do you mean:
>
> http://steven_watanabe.users.sourceforge.net/type_erasure/libs/type_erasure/doc/html/boost/type_erasure/any.html#id2370327-bb
>
>

Yes, i guess.

Is the following correct?

     class X {
     public:
       X(int, double);
     };

    std::vector<double> vec;
    int i = 10;
    double d = 2.5;
    X x;

    tuple<construct, _a&amp;, _b, _c> t1(vec, i, d);
    tuple<construct, _a&amp;, _b, _c> t2(x, i, d);
    any<construct, _a> v1(get<1>(t1), get<2>(t1));
    any<construct, _a> v2(get<1>(t2), get<2>(t2));

If yes, how v1 is bound to vec and v2 to x?

Vicente
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/TypeErasure-Forward-constructors-and-binded-types-tp4633181p4633224.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk