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 value</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="../../../proto/reference.html#header.boost.proto.traits_hpp" title="Header <boost/proto/traits.hpp>"> 10<link rel="prev" href="child/resu_1_3_33_5_39_2_1_4_4_5.html" title="Struct template result<This(Expr)>"> 11<link rel="next" href="value/resu_1_3_33_5_39_2_1_4_5_3.html" title="Struct template result<This(Expr)>"> 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="child/resu_1_3_33_5_39_2_1_4_4_5.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../proto/reference.html#header.boost.proto.traits_hpp"><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="value/resu_1_3_33_5_39_2_1_4_5_3.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.proto.functional.value"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Struct value</span></h2> 30<p>boost::proto::functional::value — 31 A callable <a class="link" href="../../../PolymorphicFunctionObject.html" title="Concept PolymorphicFunctionObject">PolymorphicFunctionObject</a> that is equivalent to the 32 <code class="computeroutput"><a class="link" href="../value.html" title="Function value">proto::value()</a></code> function. 33 </p> 34</div> 35<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 36<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.traits_hpp" title="Header <boost/proto/traits.hpp>">boost/proto/traits.hpp</a>> 37 38</span> 39<span class="keyword">struct</span> <a class="link" href="value.html" title="Struct value">value</a> <span class="special">:</span> <span class="keyword"></span> <a class="link" href="../callable.html" title="Struct callable">proto::callable</a> <span class="special">{</span> 40 <span class="comment">// member classes/structs/unions</span> 41 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> This<span class="special">,</span> <span class="keyword">typename</span> <a class="link" href="../../../Expr.html" title="Concept Expr">Expr</a><span class="special">></span> 42 <span class="keyword">struct</span> <a class="link" href="value/resu_1_3_33_5_39_2_1_4_5_3.html" title="Struct template result<This(Expr)>">result</a><span class="special"><</span><span class="identifier">This</span><span class="special">(</span><span class="identifier">Expr</span><span class="special">)</span><span class="special">></span> <span class="special">:</span> <span class="keyword"></span> <a class="link" href="../result_of/value.html" title="Struct template value">proto::result_of::value</a>< Expr > <span class="special">{</span> 43 <span class="special">}</span><span class="special">;</span> 44 45 <span class="comment">// <a class="link" href="value.html#id-1_3_33_5_39_2_1_4_5_4-bb">public member functions</a></span> 46 <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> 47 <span class="keyword">typename</span> <a class="link" href="../result_of/value.html" title="Struct template value">proto::result_of::value</a><span class="special"><</span> <span class="identifier">Expr</span> <span class="special">&</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span> <a class="link" href="value.html#id-1_3_33_5_39_2_1_4_5_4_1-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">Expr</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 48 <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> 49 <span class="keyword">typename</span> <a class="link" href="../result_of/value.html" title="Struct template value">proto::result_of::value</a><span class="special"><</span> <span class="identifier">Expr</span> <span class="keyword">const</span> <span class="special">&</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span> 50 <a class="link" href="value.html#id-1_3_33_5_39_2_1_4_5_4_2-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">Expr</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 51<span class="special">}</span><span class="special">;</span></pre></div> 52<div class="refsect1"> 53<a name="id-1.3.33.5.41.8.4"></a><h2>Description</h2> 54<div class="refsect2"> 55<a name="id-1.3.33.5.41.8.4.2"></a><h3> 56<a name="id-1_3_33_5_39_2_1_4_5_4-bb"></a><code class="computeroutput">value</code> public member functions</h3> 57<div class="orderedlist"><ol class="orderedlist" type="1"> 58<li class="listitem"> 59<pre class="literallayout"><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> 60 <span class="keyword">typename</span> <a class="link" href="../result_of/value.html" title="Struct template value">proto::result_of::value</a><span class="special"><</span> <span class="identifier">Expr</span> <span class="special">&</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span> 61 <a name="id-1_3_33_5_39_2_1_4_5_4_1-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">Expr</span> <span class="special">&</span> expr<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 62<p> 63 Return the value of the given terminal expression. 64 </p> 65<div class="variablelist"><table border="0" class="variablelist compact"> 66<colgroup> 67<col align="left" valign="top"> 68<col> 69</colgroup> 70<tbody> 71<tr> 72<td><p><span class="term">Parameters:</span></p></td> 73<td><div class="variablelist"><table border="0" class="variablelist compact"> 74<colgroup> 75<col align="left" valign="top"> 76<col> 77</colgroup> 78<tbody><tr> 79<td><p><span class="term"><code class="computeroutput">expr</code></span></p></td> 80<td><p>The terminal expression node. </p></td> 81</tr></tbody> 82</table></div></td> 83</tr> 84<tr> 85<td><p><span class="term">Requires:</span></p></td> 86<td> 87<p> 88 <code class="computeroutput"><a class="link" href="../is_expr.html" title="Struct template is_expr">proto::is_expr</a><Expr>::value</code> is 89 <code class="computeroutput">true</code> 90 </p> 91<p> 92 <code class="computeroutput">0 == Expr::proto_arity::value</code> 93 </p> 94</td> 95</tr> 96<tr> 97<td><p><span class="term">Returns:</span></p></td> 98<td><p> 99 <code class="computeroutput"><a class="link" href="../value.html" title="Function value">proto::value</a>(expr)</code> 100 </p></td> 101</tr> 102<tr> 103<td><p><span class="term">Throws:</span></p></td> 104<td>Will not throw.</td> 105</tr> 106</tbody> 107</table></div> 108</li> 109<li class="listitem"> 110<pre class="literallayout"><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> 111 <span class="keyword">typename</span> <a class="link" href="../result_of/value.html" title="Struct template value">proto::result_of::value</a><span class="special"><</span> <span class="identifier">Expr</span> <span class="keyword">const</span> <span class="special">&</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span> 112 <a name="id-1_3_33_5_39_2_1_4_5_4_2-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">Expr</span> <span class="keyword">const</span> <span class="special">&</span> expr<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 113<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p> 114</li> 115</ol></div> 116</div> 117</div> 118</div> 119<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 120<td align="left"></td> 121<td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p> 122 Distributed under the Boost Software License, Version 1.0. (See accompanying 123 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>) 124 </p> 125</div></td> 126</tr></table> 127<hr> 128<div class="spirit-nav"> 129<a accesskey="p" href="child/resu_1_3_33_5_39_2_1_4_4_5.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../proto/reference.html#header.boost.proto.traits_hpp"><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="value/resu_1_3_33_5_39_2_1_4_5_3.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 130</div> 131</body> 132</html> 133