[Proto] terminal class acting as Pod
I remember seeing a example code where terminal where treated as POD thanks to some macro. basically, if i have a foo_expr in a foo_domain, how can I build a special terminal class which acts as a POD if foo_expr is generated using pod_generator so I can write stuff like : foo x = { ... soem value }; where foo is a terminal extending foo_expr -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
Joel Falcou wrote:
I remember seeing a example code where terminal where treated as POD thanks to some macro. basically, if i have a foo_expr in a foo_domain, how can I build a special terminal class which acts as a POD if foo_expr is generated using pod_generator so I can write stuff like :
foo x = { ... soem value };
where foo is a terminal extending foo_expr
Is BOOST_PROTO_EXTENDS what you're looking for? http://boost-sandbox.sourceforge.net/libs/proto/doc/html/BOOST_PROTO_EXTENDS... -- Eric Niebler BoostPro Computing http://www.boostpro.com
Eric Niebler a écrit :
Is BOOST_PROTO_EXTENDS what you're looking for?
http://boost-sandbox.sourceforge.net/libs/proto/doc/html/BOOST_PROTO_EXTENDS...
This works for any type then, not only expression types ? If so, yes this is it :) -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
Joel Falcou wrote:
Eric Niebler a écrit :
Is BOOST_PROTO_EXTENDS what you're looking for?
http://boost-sandbox.sourceforge.net/libs/proto/doc/html/BOOST_PROTO_EXTENDS...
This works for any type then, not only expression types ? If so, yes this is it :)
I guess I don't understand what you're asking for. Your initial mail mentions types foo_expr and foo, but doesn't say what the relationship between the two is. Could you pls clarify? -- Eric Niebler BoostPro Computing http://www.boostpro.com
Eric Niebler a écrit :
I guess I don't understand what you're asking for. Your initial mail mentions types foo_expr and foo, but doesn't say what the relationship between the two is. Could you pls clarify?
foo is a specific terminal extending foo_expr (much like vec3 is a terminal extending vec_grammar in the vec3 example). The macro made it work. Thanks -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
participants (2)
-
Eric Niebler
-
Joel Falcou