1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Struct template impl</title> 6<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../lazy.html#id-1.3.33.5.51.4.4" title="Description"> 10<link rel="prev" href="../lazy.html" title="Struct template lazy"> 11<link rel="next" href="../noinvoke.html" title="Struct template noinvoke"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> 16<td align="center"><a href="../../../../../index.html">Home</a></td> 17<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="../lazy.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lazy.html#id-1.3.33.5.51.4.4"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../noinvoke.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.proto.lazy.impl"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Struct template impl</span></h2> 30<p>boost::proto::lazy::impl</p> 31</div> 32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../../proto/reference.html#header.boost.proto.transform.lazy_hpp" title="Header <boost/proto/transform/lazy.hpp>">boost/proto/transform/lazy.hpp</a>> 34 35</span> 36<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <a class="link" href="../../../Expr.html" title="Concept Expr">Expr</a><span class="special">,</span> <span class="keyword">typename</span> State<span class="special">,</span> <span class="keyword">typename</span> Data<span class="special">></span> 37<span class="keyword">struct</span> <a class="link" href="impl.html" title="Struct template impl">impl</a> <span class="special">:</span> <span class="keyword"></span> <a class="link" href="../transform_impl.html" title="Struct template transform_impl">proto::transform_impl</a><Expr, State, Data> <span class="special">{</span> 38 <span class="comment">// <a class="link" href="impl.html#boost.proto.lazy.impltypes">types</a></span> 39 <span class="keyword">typedef</span> <em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em> <a class="link" href="impl.html#boost.proto.lazy.impl.result_type"><span class="identifier">result_type</span></a><span class="special">;</span> 40 41 <span class="comment">// <a class="link" href="impl.html#id-1_3_33_5_49_2_1_1_5_4-bb">public member functions</a></span> 42 <span class="identifier">result_type</span> <a class="link" href="impl.html#id-1_3_33_5_49_2_1_1_5_4_1-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">expr_param</span><span class="special">,</span> 43 <span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">state_param</span><span class="special">,</span> 44 <span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">data_param</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 45<span class="special">}</span><span class="special">;</span></pre></div> 46<div class="refsect1"> 47<a name="id-1.3.33.5.51.4.4.4.4"></a><h2>Description</h2> 48<div class="refsect2"> 49<a name="id-1.3.33.5.51.4.4.4.4.2"></a><h3> 50<a name="boost.proto.lazy.impltypes"></a><code class="computeroutput">impl</code> 51 public 52 types</h3> 53<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 54<p> 55<span class="keyword">typedef</span> <em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em> <a name="boost.proto.lazy.impl.result_type"></a><span class="identifier">result_type</span><span class="special">;</span></p> 56<p> 57 <code class="computeroutput"><a class="link" href="../lazy.html" title="Struct template lazy">proto::lazy</a><T>::impl<Expr,State,Data>::result_type</code> 58 is calculated as follows: 59 </p> 60<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 61<li class="listitem"><p> 62 If <code class="computeroutput">T</code> if of the form 63 <code class="computeroutput">O(A<sub>0</sub>,…A<sub>n</sub>)</code>, then let <code class="computeroutput">O'</code> 64 be <code class="computeroutput">boost::result_of<<a class="link" href="../make.html" title="Struct template make">proto::make</a><O>(Expr, State, Data)>::type</code> 65 and let <code class="computeroutput">T'</code> be <code class="computeroutput">O'(A<sub>0</sub>,…A<sub>n</sub>)</code>. 66 </p></li> 67<li class="listitem"><p> 68 If <code class="computeroutput">T</code> if of the form 69 <code class="computeroutput">O(A<sub>0</sub>,…A<sub>n</sub> ...)</code>, then let <code class="computeroutput">O'</code> 70 be <code class="computeroutput">boost::result_of<<a class="link" href="../make.html" title="Struct template make">proto::make</a><O>(Expr, State, Data)>::type</code> 71 and let <code class="computeroutput">T'</code> be <code class="computeroutput">O'(A<sub>0</sub>,…A<sub>n</sub> ...)</code>. 72 </p></li> 73<li class="listitem"><p> 74 Otherwise, let <code class="computeroutput">T'</code> 75 be <code class="computeroutput">boost::result_of<<a class="link" href="../make.html" title="Struct template make">proto::make</a><T>(Expr, State, Data)>::type</code>. 76 </p></li> 77</ul></div> 78<p> 79 </p> 80<p> 81 The result type is 82 <code class="computeroutput"> 83 boost::result_of<<a class="link" href="../call.html" title="Struct template call">proto::call</a><T'>(Expr, State, Data)>::type 84 </code>. 85 </p> 86<p> 87 </p> 88</li></ol></div> 89</div> 90<div class="refsect2"> 91<a name="id-1.3.33.5.51.4.4.4.4.3"></a><h3> 92<a name="id-1_3_33_5_49_2_1_1_5_4-bb"></a><code class="computeroutput">impl</code> public member functions</h3> 93<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 94<pre class="literallayout"><span class="identifier">result_type</span> <a name="id-1_3_33_5_49_2_1_1_5_4_1-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">expr_param</span> expr<span class="special">,</span> 95 <span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">state_param</span> state<span class="special">,</span> 96 <span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">data_param</span> data<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 97<p> 98 <code class="computeroutput"><code class="computeroutput"><a class="link" href="../lazy.html" title="Struct template lazy">proto::lazy</a></code><T>::impl<Expr,State,Data>::operator()</code> behaves as follows: 99 </p> 100<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 101<li class="listitem"><p> 102 If <code class="computeroutput">T</code> if of the form 103 <code class="computeroutput">O(A<sub>0</sub>,…A<sub>n</sub>)</code>, then let <code class="computeroutput">O'</code> 104 be <code class="computeroutput">boost::result_of<<code class="computeroutput"><a class="link" href="../make.html" title="Struct template make">proto::make</a></code><O>(Expr, State, Data)>::type</code> 105 and let <code class="computeroutput">T'</code> be <code class="computeroutput">O'(A<sub>0</sub>,…A<sub>n</sub>)</code>. 106 </p></li> 107<li class="listitem"><p> 108 If <code class="computeroutput">T</code> if of the form 109 <code class="computeroutput">O(A<sub>0</sub>,…A<sub>n</sub> ...)</code>, then let <code class="computeroutput">O'</code> 110 be <code class="computeroutput">boost::result_of<<code class="computeroutput"><a class="link" href="../make.html" title="Struct template make">proto::make</a></code><O>(Expr, State, Data)>::type</code> 111 and let <code class="computeroutput">T'</code> be <code class="computeroutput">O'(A<sub>0</sub>,…A<sub>n</sub> ...)</code>. 112 </p></li> 113<li class="listitem"><p> 114 Otherwise, let <code class="computeroutput">T'</code> 115 be <code class="computeroutput">boost::result_of<<code class="computeroutput"><a class="link" href="../make.html" title="Struct template make">proto::make</a></code><T>(Expr, State, Data)>::type</code>. 116 </p></li> 117</ul></div> 118<p> 119 </p> 120<div class="variablelist"><table border="0" class="variablelist compact"> 121<colgroup> 122<col align="left" valign="top"> 123<col> 124</colgroup> 125<tbody><tr> 126<td><p><span class="term">Returns:</span></p></td> 127<td><p> 128 <code class="computeroutput"> 129 <a class="link" href="../call.html" title="Struct template call">proto::call</a><T'>()(expr, state, data) 130 </code> 131 </p></td> 132</tr></tbody> 133</table></div> 134</li></ol></div> 135</div> 136</div> 137</div> 138<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 139<td align="left"></td> 140<td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p> 141 Distributed under the Boost Software License, Version 1.0. (See accompanying 142 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 143 </p> 144</div></td> 145</tr></table> 146<hr> 147<div class="spirit-nav"> 148<a accesskey="p" href="../lazy.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lazy.html#id-1.3.33.5.51.4.4"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../noinvoke.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 149</div> 150</body> 151</html> 152