
Pavel Chikulaev wrote:
"Jonathan Turkanis" <technews@kangaroologic.com> wrote in message news:d0iend$tg3$1@sea.gmane.org...
1. You might way to include a general treatment of placeholder symbols (_1, _2, _3, ...) in you're library, to help reduce the number of different conflicting definitions from various libraries. I use placeholder symbols (_1, _2, _3, ...) as public static members of lazy::type<T>. So there shouln't be such problems.
What do you think which statement is more readable and understandable? LAZY_ALIAS(-Matrix_ + Matrix_ = Matrix_._2 - Matrix_._1); or LAZY_ALIAS(-Matrix_ + Matrix_ = _2 - _1);
If second then I better include such support.
2. You might provide native support for reference wrappers, from Boost.Ref (or TR1).
Matrix a, b, c, d, e; //.. a = (b + c * d * (d + -b + - - c);
Expression template on rhs operators only with references to a, b, c, d, e. Also I use boost::call_traits<T>::param_type where building expession template. So I think there is no need for such support. Maybe I misunderstand something?
My point is that if you want existing libraries or new libraries patterned after existing Boost libraries to use your infrastructure, you should provide support for placeholders and reference wrappers to be used as part of the public interface of such libraries. E.g., imagine that Boost.Lambda were rewritten to use your library. Could your _1, _2 etc be used in all the ways they are currently used by Boost.Lambda? Jonathan