is already a Proto expression or not. The object <code class="computeroutput"><span class="identifier">l</span></code>
is guaranteed to be a valid Proto expression. If <code class="computeroutput"><span class="identifier">x</span></code>
is a non-Proto object, it is turned into a terminal expression that holds
- <code class="computeroutput"><span class="identifier">x</span></code> <span class="emphasis"><em>by value</em></span>.<a href="#ftn.boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.per_domain_as_child.f0" class="footnote" name="boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.per_domain_as_child.f0"><sup class="footnote">[32]</sup></a> If <code class="computeroutput"><span class="identifier">x</span></code> is a
+ <code class="computeroutput"><span class="identifier">x</span></code> <span class="emphasis"><em>by value</em></span>.<a href="#ftn.boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.per_domain_as_child.f0" class="footnote" name="boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.per_domain_as_child.f0"><sup class="footnote">[34]</sup></a> If <code class="computeroutput"><span class="identifier">x</span></code> is a
Proto object already, <code class="computeroutput"><a class="link" href="../boost/proto/as_expr.html" title="Function as_expr">proto::as_expr()</a></code>
returns it <span class="emphasis"><em>by value</em></span> unmodified.
</p>
</pre>
<p>
... they will get a compile-time error message on the line with the assertion
- that reads something like this<a href="#ftn.boost_proto.users_guide.back_end.expression_transformation.example__calculator_arity.f0" class="footnote" name="boost_proto.users_guide.back_end.expression_transformation.example__calculator_arity.f0"><sup class="footnote">[33]</sup></a>:
+ that reads something like this<a href="#ftn.boost_proto.users_guide.back_end.expression_transformation.example__calculator_arity.f0" class="footnote" name="boost_proto.users_guide.back_end.expression_transformation.example__calculator_arity.f0"><sup class="footnote">[35]</sup></a>:
</p>
<pre class="programlisting">c:\boost\org\trunk\libs\proto\scratch\main.cpp(97) : error C2664: 'boost::mpl::asse
rtion_failed' : cannot convert parameter 1 from 'boost::mpl::failed ************boo
</div>
<div class="footnotes">
<br><hr style="width:100; text-align:left;margin-left: 0">
-<div id="ftn.boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.per_domain_as_child.f0" class="footnote"><p><a href="#boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.per_domain_as_child.f0" class="para"><sup class="para">[32] </sup></a>
+<div id="ftn.boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.per_domain_as_child.f0" class="footnote"><p><a href="#boost_proto.users_guide.front_end.customizing_expressions_in_your_domain.per_domain_as_child.f0" class="para"><sup class="para">[34] </sup></a>
It's not always possible to hold something by value. By default, <code class="computeroutput"><a class="link" href="../boost/proto/as_expr.html" title="Function as_expr">proto::as_expr()</a></code> makes an exception
for functions, abstract types, and iostreams (types derived from <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios_base</span></code>). These objects are held
by reference. All others are held by value, even arrays.
</p></div>
-<div id="ftn.boost_proto.users_guide.back_end.expression_transformation.example__calculator_arity.f0" class="footnote"><p><a href="#boost_proto.users_guide.back_end.expression_transformation.example__calculator_arity.f0" class="para"><sup class="para">[33] </sup></a>
+<div id="ftn.boost_proto.users_guide.back_end.expression_transformation.example__calculator_arity.f0" class="footnote"><p><a href="#boost_proto.users_guide.back_end.expression_transformation.example__calculator_arity.f0" class="para"><sup class="para">[35] </sup></a>
This error message was generated with Microsoft Visual C++ 9.0. Different
compilers will emit different messages with varying degrees of readability.
</p></div>