On Mon, Jan 30, 2012 at 4:53 AM, Mathias Gaunard <mathias.gaun...@ens-lyon.org> wrote: > For a couple of reasons, I'm considering replacing the proto-provided > operator tags by my own in the generator of my domain. > > What would the easiest and less costly way of doing it?
You mean, for instance, you want Proto's operator+ to return an expression with a tag other than tag::plus? Can I ask why? You can do this in a generator, but you're right to be cautious of compile times. Proto will instantiate a bunch of templates while assembling each expression before passing them to your generator, which would just rip them apart and throw them away. Your other option would be to use the (undocumented) BOOST_PROTO_DEFINE_UNARY_OPERATOR and BOOST_PROTO_DEFINE_BINARY_OPERATOR to define a complete alternate set of operator overloads that use your tags instead of proto's. See proto/operators.hpp. Nobody has ever done this and I don't know if it would work. Eric _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto