Boost C++ Libraries: Ticket #4668: Conditions for operator overload in Proto (documentation) https://svn.boost.org/trac10/ticket/4668 <p> Taken from this thread in boost-users: <a class="ext-link" href="http://lists.boost.org/boost-users/2010/09/62747.php"><span class="icon">​</span>http://lists.boost.org/boost-users/2010/09/62747.php</a> </p> <p> This explanation by Thomas Heller would make a good section for the proto documentation: </p> <pre class="wiki">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. </pre><p> To illustrate what this means, this minimalistic example might be useful, too: </p> <p> This grammar </p> <pre class="wiki">proto::plus&lt;proto::terminal&lt;int&gt;, proto::terminal&lt;int&gt; &gt; </pre><p> used in a domain would not allow </p> <pre class="wiki">i + i; </pre><p> with i being an int-terminal. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4668 Trac 1.4.3 Eric Niebler Wed, 06 Oct 2010 18:18:11 GMT status changed https://svn.boost.org/trac10/ticket/4668#comment:1 https://svn.boost.org/trac10/ticket/4668#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket