Ok, but auto is c++0x specific, right?

Is there a possibility for c++03?

On 03/18/2011 05:02 PM, Nate Knight wrote:
> On Mar 18, 2011, at 9:17 AM, Karsten Ahnert wrote:
> 
>> Hmm, this might work. It is similar to
>>
>> my_method( fusion::make_vector( i+i , i*i*i , i*i ) , x );
>>
>> But the expression might become really large, say 100 elements. A
>> separation between construction and usage would be nicer.
> 
> 
> How about?
> 
>     struct expr_list_tag {};
> 
>     ...
> 
>     terminal<int>::type i = {0};
> 
>     // you could wrap this in a function named construct or whatever
>     auto e = make_expr<expr_list_tag>(i+i, i*i, i*i*i);
> 
>     ...
> 
>     do_step(e, x);
> 
> I think you need to capture terminals by value to do this kind of thing.
> _______________________________________________
> proto mailing list
> proto@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/proto


-- 
Dr. Karsten Ahnert
Ambrosys GmbH - Gesellschaft für Management komplexer Systeme
Geschwister-Scholl-Str. 63a
D-14471 Potsdam

Tel: +4917682001688
Fax: +493319791300

Ambrosys GmbH - Gesellschaft für Management komplexer Systems
Gesellschaft mit beschränkter Haftung
Sitz der Gesellschaft: Geschwister-Scholl-Str. 63a, 14471 Potsdam
Registergericht: Amtsgericht Potsdam, HRB 21228 P
Geschäftsführer: Dr. Karsten Ahnert, Dr. Markus Abel
_______________________________________________
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto

Reply via email to