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