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 env</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.transform.env_hpp" title="Header <boost/proto/transform/env.hpp>"> 10<link rel="prev" href="empty_env.html" title="Struct empty_env"> 11<link rel="next" href="is_env.html" title="Struct template is_env"> 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="empty_env.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../proto/reference.html#header.boost.proto.transform.env_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="is_env.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.proto.env"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Struct template env</span></h2> 30<p>boost::proto::env</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.env_hpp" title="Header <boost/proto/transform/env.hpp>">boost/proto/transform/env.hpp</a>> 34 35</span><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Key<span class="special">,</span> <span class="keyword">typename</span> Value<span class="special">,</span> <span class="keyword">typename</span> Env <span class="special">=</span> <a class="link" href="empty_env.html" title="Struct empty_env">proto::empty_env</a><span class="special">></span> 36<span class="keyword">struct</span> <a class="link" href="env.html" title="Struct template env">env</a> <span class="special">{</span> 37 <span class="comment">// <a class="link" href="env.html#boost.proto.envconstruct-copy-destruct">construct/copy/destruct</a></span> 38 <span class="keyword">explicit</span> <a class="link" href="env.html#id-1_3_33_5_44_1_1_3_2-bb"><span class="identifier">env</span></a><span class="special">(</span><span class="identifier">Value</span> <span class="keyword">const</span> <span class="special">&</span><span class="special">,</span> <span class="identifier">Env</span> <span class="keyword">const</span> <span class="special">&</span> <span class="special">=</span> <span class="identifier">Env</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span> 39 40 <span class="comment">// <a class="link" href="env.html#id-1_3_33_5_44_1_1_3_3-bb">public member functions</a></span> 41 <em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em> <a class="link" href="env.html#id-1_3_33_5_44_1_1_3_3_1-bb"><span class="keyword">operator</span><span class="special">[</span><span class="special">]</span></a><span class="special">(</span><em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 42<span class="special">}</span><span class="special">;</span></pre></div> 43<div class="refsect1"> 44<a name="id-1.3.33.5.46.12.4"></a><h2>Description</h2> 45<div class="refsect2"> 46<a name="id-1.3.33.5.46.12.4.2"></a><h3> 47<a name="boost.proto.envconstruct-copy-destruct"></a><code class="computeroutput">env</code> 48 public 49 construct/copy/destruct</h3> 50<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 51<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_33_5_44_1_1_3_2-bb"></a><span class="identifier">env</span><span class="special">(</span><span class="identifier">Value</span> <span class="keyword">const</span> <span class="special">&</span> value<span class="special">,</span> <span class="identifier">Env</span> <span class="keyword">const</span> <span class="special">&</span> other <span class="special">=</span> <span class="identifier">Env</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre> 52<div class="variablelist"><table border="0" class="variablelist compact"> 53<colgroup> 54<col align="left" valign="top"> 55<col> 56</colgroup> 57<tbody><tr> 58<td><p><span class="term">Parameters:</span></p></td> 59<td><div class="variablelist"><table border="0" class="variablelist compact"> 60<colgroup> 61<col align="left" valign="top"> 62<col> 63</colgroup> 64<tbody> 65<tr> 66<td><p><span class="term"><code class="computeroutput">other</code></span></p></td> 67<td><p> 68 Another key/value store. 69 </p></td> 70</tr> 71<tr> 72<td><p><span class="term"><code class="computeroutput">value</code></span></p></td> 73<td><p> 74 The value to be associated with the <code class="computeroutput">Key</code>. 75 </p></td> 76</tr> 77</tbody> 78</table></div></td> 79</tr></tbody> 80</table></div> 81</li></ol></div> 82</div> 83<div class="refsect2"> 84<a name="id-1.3.33.5.46.12.4.3"></a><h3> 85<a name="id-1_3_33_5_44_1_1_3_3-bb"></a><code class="computeroutput">env</code> public member functions</h3> 86<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 87<pre class="literallayout"><em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em> <a name="id-1_3_33_5_44_1_1_3_3_1-bb"></a><span class="keyword">operator</span><span class="special">[</span><span class="special">]</span><span class="special">(</span><em class="replaceable"><code><span class="identifier">see</span><span class="special">-</span><span class="identifier">below</span></code></em><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> 88<p> 89 If called with an object that is implicitly convertible to type <code class="computeroutput">Key</code>, 90 this function returns the <code class="computeroutput">Value</code> passed to the constructor. Otherwise, it returns 91 the result of calling <code class="computeroutput">operator[]</code> on the <code class="computeroutput">Env</code> passed to 92 the constructor. 93 </p> 94</li></ol></div> 95</div> 96</div> 97</div> 98<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 99<td align="left"></td> 100<td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p> 101 Distributed under the Boost Software License, Version 1.0. (See accompanying 102 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>) 103 </p> 104</div></td> 105</tr></table> 106<hr> 107<div class="spirit-nav"> 108<a accesskey="p" href="empty_env.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../proto/reference.html#header.boost.proto.transform.env_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="is_env.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 109</div> 110</body> 111</html> 112