
Larry Evans wrote:
On page:
http://boost-sandbox.sourceforge.net/libs/proto/doc/html/boost_proto/user_s_...
the sentence:
Notice that in order to build a Proto expression template, at least one argument in the expression must be a Proto-ified. In this case, that is done with the terminal<> class template, which is used to wrap std::cout.
was, at first, unclear to me because evaluate just had one argument; however, "one argument in expression" suggests there could be more than one.
The following would be clearer to me:
Notice that in order to build a Proto expression template, at least one subexpression of the whole expression must be a Proto-ified. In the case of:
cout_ << "hello" << ',' << " world"
this one Proto-ified subexpression is cout_, which is the Proto-ification of std::cout via wrapping by the terminal<> class template.
I hope that's right. If not, then I still don't know what the sentence means :(
Yeesh, I was being very imprecise. Your's is an improvement, but it's still not completely accurate. It needs to say that for any /operator/ in an expression, at least one operand must be proto-ified. Otherwise, proto's operator overloads will not be found. -- Eric Niebler Boost Consulting www.boost-consulting.com