On 23/11/10 17:20, Eric Niebler wrote:
On 11/23/2010 10:19 AM, Joel Falcou wrote:
So, question is: is there a way to have an extensible list of
when<pattern,rule>  that can be extended "from the outside", something
like a proto::switch_ but with patterns instead of tag ?
No. The best you can do is document how to define a new Proto algorithm
from an old one:

   struct Old : proto::or_<  ...>  {};

   struct New : proto::or_<  my_stuff, Old>  {};

Now everywhere in your library that you have the Old algorithm
hard-coded, you need to make it a template parameter so that your stuff
can be used with an extended algorithm.
Can't the new extrnal_transform be of any help ?

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

Reply via email to