[Boost-bugs] [Boost C++ Libraries] #4668: Conditions for operator overload in Proto (documentation)

Subject: [Boost-bugs] [Boost C++ Libraries] #4668: Conditions for operator overload in Proto (documentation)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-21 20:00:16


#4668: Conditions for operator overload in Proto (documentation)
-----------------------------------------------------------+----------------
 Reporter: Roland Bock <rbock@…> | Owner: eric_niebler
     Type: Tasks | Status: new
Milestone: To Be Determined | Component: proto
  Version: Boost 1.44.0 | Severity: Optimization
 Keywords: grammar, domain, extension, operator overload |
-----------------------------------------------------------+----------------
 Taken from this thread in boost-users: http://lists.boost.org/boost-
 users/2010/09/62747.php

 This explanation by Thomas Heller would make a good section for the proto
 documentation:

 {{{
 In order for a proto overload to be created the following conditions must
 be
 true:

 1) the operands must be in a compatible domain
 2) the left hand operand and the right hand operand must match the grammar
 specified in the domain
 3) the resulting expression must match the grammar specified in the
 domain.
 }}}

 To illustrate what this means, this minimalistic example might be useful,
 too:

 This grammar


 {{{
 proto::plus<proto::terminal<int>, proto::terminal<int> >
 }}}


 used in a domain would not allow


 {{{
 i + i;
 }}}


 with i being an int-terminal.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4668>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC