blob: 224dbd20fdb912ebd9680c108e3e10355ec62189 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<header name="boost/proto/proto_typeof.hpp">
<para>Boost.Typeof registrations for Proto's types, and definition of the
<computeroutput><macroname>BOOST_PROTO_AUTO</macroname>()</computeroutput> macro.</para>
<macro name="BOOST_PROTO_AUTO" kind="functionlike">
<macro-parameter name="Var"/>
<macro-parameter name="Expr"/>
<purpose>For defining a local variable that stores a Proto expression template,
deep-copying the expression so there are no dangling references.</purpose>
<description>
<para>
To define a local variable <computeroutput>ex</computeroutput> that stores the expression
<computeroutput><functionname alt="boost::proto::lit">proto::lit</functionname>(1) + 2</computeroutput>,
do the following:<programlisting>BOOST_PROTO_AUTO( ex, <functionname alt="boost::proto::lit">proto::lit</functionname>(1) + 2 );</programlisting>.
The above is equivalent to the following:
<programlisting>BOOST_AUTO( ex, <functionname alt="boost::proto::deep_copy">proto::deep_copy</functionname>( <functionname alt="boost::proto::lit">proto::lit</functionname>(1) + 2 ) );</programlisting>
</para>
</description>
</macro>
</header>