On 26/08/2011 17:27, Brandon Kohn wrote:
I solved this kind of problem by tagging the various types in traits
structs and then embedding these traits in the transforms for the
various operations.

Here are examples of my expression, grammar, and binary function
definitions:

https://github.com/brandon-kohn/Geometrix/blob/master/geometrix/algebra/expression.hpp


https://github.com/brandon-kohn/Geometrix/blob/master/geometrix/algebra/grammar.hpp


https://github.com/brandon-kohn/Geometrix/blob/master/geometrix/algebra/binary_functions.hpp


I'm not sure if this is the best way to do these, but it does work.


These coudl be grammar. Anytime you want to have somethign selecting somethign based on expression structure, it is a grammar. Such metafonction systems ar eusualyl brittle or not extensible enough.

_______________________________________________
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto

Reply via email to