Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55635 - trunk/libs/mpl/doc/refmanual
From: agurtovoy_at_[hidden]
Date: 2009-08-17 19:36:53


Author: agurtovoy
Date: 2009-08-17 19:36:52 EDT (Mon, 17 Aug 2009)
New Revision: 55635
URL: http://svn.boost.org/trac/boost/changeset/55635

Log:
MPL refmanual: add forgotten docs
Added:
   trunk/libs/mpl/doc/refmanual/c-str.html (contents, props changed)
   trunk/libs/mpl/doc/refmanual/char.html (contents, props changed)
   trunk/libs/mpl/doc/refmanual/limit-string-size.html (contents, props changed)
   trunk/libs/mpl/doc/refmanual/string-operations.html (contents, props changed)
   trunk/libs/mpl/doc/refmanual/string.html (contents, props changed)

Added: trunk/libs/mpl/doc/refmanual/c-str.html
==============================================================================
--- (empty file)
+++ trunk/libs/mpl/doc/refmanual/c-str.html 2009-08-17 19:36:52 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
+<title>The MPL Reference Manual: c_str</title>
+<link rel="stylesheet" href="../style.css" type="text/css" />
+</head>
+<body class="docframe refmanual">
+<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td class="header-group page-location">Front Page / Metafunctions / String Operations / c_str</td>
+</tr></table><div class="header-separator"></div>
+<div class="section" id="c-str">
+<h1><a class="toc-backref" href="./string-operations.html#id1545">c_str</a></h1>
+<div class="section" id="id1137">
+<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
+<pre class="literal-block">
+template&lt;
+ typename Sequence
+ &gt;
+struct c_str
+{
+ typedef <em>unspecified</em> type;
+ static char const value[];
+};
+</pre>
+</div>
+<div class="section" id="id1138">
+<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
+<p><tt class="literal"><span class="pre">c_str</span></tt> converts the <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">Sequence</span></tt>
+into a null-terminated byte string containing an equivalent sequence.</p>
+</div>
+<div class="section" id="id1139">
+<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
+<pre class="literal-block">
+#include &lt;boost/mpl/string.hpp&gt;
+</pre>
+</div>
+<div class="section" id="id1140">
+<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
+<p><a class="reference internal" href="./metafunction.html">Metafunction</a></p>
+</div>
+<div class="section" id="id1141">
+<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
+<table border="1" class="docutils table">
+<colgroup>
+<col width="17%" />
+<col width="30%" />
+<col width="53%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Parameter</th>
+<th class="head">Requirement</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
+<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of
+<a class="reference internal" href="./integral-constant.html">Integral Constant</a>s</td>
+<td>A sequence to be converted into a
+null-terminated byte string.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id1142">
+<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
+<div class="expression-semantics compound">
+<p class="compound-first">For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">s</span></tt>,</p>
+<pre class="compound-middle literal-block">
+c_str&lt;s&gt;::value;
+</pre>
+<table class="compound-last docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A null-terminated byte string.</p>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">size&lt;s&gt;::value</span> <span class="pre">&lt;=</span> <span class="pre">BOOST_MPL_STRING_MAX_LENGTH</span></tt>.</p>
+</td>
+</tr>
+<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
+<pre class="last literal-block">
+char const value[] = {
+ at&lt;s, 0&gt;::type::value
+ , ...
+ , at&lt;s, size&lt;s&gt;::value-1&gt;::type::value
+ , '\0'
+};
+</pre>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="section" id="id1143">
+<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
+<table border="1" class="docutils table">
+<colgroup>
+<col width="47%" />
+<col width="53%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Sequence archetype</th>
+<th class="head">Complexity</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
+<td>Linear.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id1144">
+<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
+<pre class="literal-block">
+typedef vector_c&lt;char,'h','e','l','l','o'&gt; hello;
+assert( 0 == std::strcmp( c_str&lt;hello&gt;::value, &quot;hello&quot; ) );
+</pre>
+</div>
+<div class="section" id="id1145">
+<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
+<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./string.html">string</a></p>
+</div>
+</div>
+
+<div class="footer-separator"></div>
+<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td><div class="copyright-footer"><div class="copyright">Copyright © 2009 Eric Niebler</div>
+Distributed under the Boost Software License, Version 1.0. (See accompanying
+file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt>)</div></td></tr></table></body>
+</html>

Added: trunk/libs/mpl/doc/refmanual/char.html
==============================================================================
--- (empty file)
+++ trunk/libs/mpl/doc/refmanual/char.html 2009-08-17 19:36:52 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
+<title>The MPL Reference Manual: char_</title>
+<link rel="stylesheet" href="../style.css" type="text/css" />
+</head>
+<body class="docframe refmanual">
+<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td class="header-group page-location">Front Page / Data Types / Numeric / char_</td>
+</tr></table><div class="header-separator"></div>
+<div class="section" id="char">
+<h1><a class="toc-backref" href="./numeric.html#id1564">char_</a></h1>
+<div class="section" id="id1262">
+<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
+<pre class="literal-block">
+template&lt;
+ char N
+ &gt;
+struct char_
+{
+ // <em>unspecified</em>
+ // ...
+};
+</pre>
+</div>
+<div class="section" id="id1263">
+<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
+<p>An <a class="reference internal" href="./integral-constant.html">Integral Constant</a> wrapper for <tt class="literal"><span class="pre">char</span></tt>.</p>
+</div>
+<div class="section" id="id1264">
+<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
+<pre class="literal-block">
+#include &lt;boost/mpl/char.hpp&gt;
+</pre>
+</div>
+<div class="section" id="id1265">
+<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
+<p><a class="reference internal" href="./integral-constant.html">Integral Constant</a></p>
+</div>
+<div class="section" id="id1266">
+<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
+<table border="1" class="docutils table">
+<colgroup>
+<col width="21%" />
+<col width="42%" />
+<col width="37%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Parameter</th>
+<th class="head">Requirement</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="literal"><span class="pre">N</span></tt></td>
+<td>A character constant</td>
+<td>A value to wrap.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id1267">
+<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
+<p>The semantics of an expression are defined only
+where they differ from, or are not defined in <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
+<p>For arbitrary character constant <tt class="literal"><span class="pre">c</span></tt>:</p>
+<table border="1" class="docutils table">
+<colgroup>
+<col width="24%" />
+<col width="76%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Expression</th>
+<th class="head">Semantics</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="literal"><span class="pre">char_&lt;c&gt;</span></tt></td>
+<td>An <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">x</span></tt> such that <tt class="literal"><span class="pre">x::value</span> <span class="pre">==</span> <span class="pre">c</span></tt>
+and <tt class="literal"><span class="pre">x::value_type</span></tt> is identical to <tt class="literal"><span class="pre">char</span></tt>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id1268">
+<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
+<pre class="literal-block">
+typedef char_&lt;'c'&gt; c;
+
+BOOST_MPL_ASSERT(( is_same&lt; c::value_type, char &gt; ));
+BOOST_MPL_ASSERT(( is_same&lt; c::type, c &gt; ));
+BOOST_MPL_ASSERT(( is_same&lt; next&lt; c &gt;::type, char_&lt;'d'&gt; &gt; ));
+BOOST_MPL_ASSERT(( is_same&lt; prior&lt; c &gt;::type, char_&lt;'b'&gt; &gt; ));
+BOOST_MPL_ASSERT_RELATION( (c::value), ==, 'c' );
+assert( c() == 'c' );
+</pre>
+</div>
+<div class="section" id="id1269">
+<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
+<p><a class="reference internal" href="./data-types.html">Data Types</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./int.html">int_</a>, <a class="reference internal" href="./size-t.html">size_t</a>, <a class="reference internal" href="./integral-c.html">integral_c</a></p>
+</div>
+</div>
+
+<div class="footer-separator"></div>
+<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td><div class="copyright-footer"><div class="copyright">Copyright © 2009 Eric Niebler</div>
+Distributed under the Boost Software License, Version 1.0. (See accompanying
+file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt>)</div></td></tr></table></body>
+</html>

Added: trunk/libs/mpl/doc/refmanual/limit-string-size.html
==============================================================================
--- (empty file)
+++ trunk/libs/mpl/doc/refmanual/limit-string-size.html 2009-08-17 19:36:52 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
+<title>The MPL Reference Manual: BOOST_MPL_LIMIT_STRING_SIZE</title>
+<link rel="stylesheet" href="../style.css" type="text/css" />
+</head>
+<body class="docframe refmanual">
+<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td class="header-group page-location">Front Page / Macros / Configuration / BOOST_MPL_LIMIT_STRING_SIZE</td>
+</tr></table><div class="header-separator"></div>
+<div class="section" id="boost-mpl-limit-string-size">
+<h1><a class="toc-backref" href="./configuration.html#id1586">BOOST_MPL_LIMIT_STRING_SIZE</a></h1>
+<div class="section" id="id1359">
+<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
+<pre class="literal-block">
+#if !defined(BOOST_MPL_LIMIT_STRING_SIZE)
+# define BOOST_MPL_LIMIT_STRING_SIZE \
+ <em>implementation-defined integral constant</em> \
+/**/
+#endif
+</pre>
+</div>
+<div class="section" id="id1360">
+<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
+<p><tt class="literal"><span class="pre">BOOST_MPL_LIMIT_STRING_SIZE</span></tt> is an overridable configuration macro regulating
+the maximum arity of the <tt class="literal"><span class="pre">string</span></tt>'s <a class="reference internal" href="./variadic-sequence.html#variadic-forms">variadic forms</a>. In this
+implementation of the library, <tt class="literal"><span class="pre">BOOST_MPL_LIMIT_STRING_SIZE</span></tt> has a default value
+of 32. To override the default limit, define <tt class="literal"><span class="pre">BOOST_MPL_LIMIT_STRING_SIZE</span></tt> to
+the desired maximum arity before including any library header.</p>
+</div>
+<div class="section" id="id1361">
+<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
+<pre class="literal-block">
+#define BOOST_MPL_LIMIT_STRING_SIZE 8
+<tt class="literal"><span class="pre">#</span></tt>include &lt;boost/mpl/string.hpp&gt;
+
+using namespace boost::mpl;
+
+typedef string&lt;'a'&gt; s_1;
+typedef string&lt;'abcd','efgh'&gt; s_8;
+// typedef string&lt;'abcd','efgh','i'&gt; s_9; // error!
+</pre>
+</div>
+<div class="section" id="id1362">
+<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
+<p><a class="reference internal" href="./configuration.html">Configuration</a>, <a class="reference internal" href="./limit-vector-size.html">BOOST_MPL_LIMIT_VECTOR_SIZE</a></p>
+<!-- Macros/Configuration//BOOST_MPL_LIMIT_UNROLLING |70 -->
+</div>
+</div>
+
+<div class="footer-separator"></div>
+<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td><div class="copyright-footer"><div class="copyright">Copyright © 2009 Eric Niebler</div>
+Distributed under the Boost Software License, Version 1.0. (See accompanying
+file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt>)</div></td></tr></table></body>
+</html>

Added: trunk/libs/mpl/doc/refmanual/string-operations.html
==============================================================================
--- (empty file)
+++ trunk/libs/mpl/doc/refmanual/string-operations.html 2009-08-17 19:36:52 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
+<title>The MPL Reference Manual: String Operations</title>
+<link rel="stylesheet" href="../style.css" type="text/css" />
+</head>
+<body class="docframe refmanual">
+<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td class="header-group page-location">Front Page / Metafunctions / String Operations</td>
+</tr></table><div class="header-separator"></div>
+<div class="section" id="string-operations">
+<h1><a class="toc-backref" href="./metafunctions.html#id1544">String Operations</a></h1>
+<!-- Metafunctions/String Operations//c_str |10 -->
+<ul class="toc simple" id="outline">
+<li><a class="reference internal" href="./c-str.html" id="id1545">c_str</a></li>
+</ul>
+</div>
+
+<div class="footer-separator"></div>
+<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td><div class="copyright-footer"><div class="copyright">Copyright 2009 Eric Niebler</div>
+Distributed under the Boost Software License, Version 1.0. (See accompanying
+file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt>)</div></td></tr></table></body>
+</html>

Added: trunk/libs/mpl/doc/refmanual/string.html
==============================================================================
--- (empty file)
+++ trunk/libs/mpl/doc/refmanual/string.html 2009-08-17 19:36:52 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
+<title>The MPL Reference Manual: string</title>
+<link rel="stylesheet" href="../style.css" type="text/css" />
+</head>
+<body class="docframe refmanual">
+<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td class="header-group page-location">Front Page / Sequences / Classes / string</td>
+</tr></table><div class="header-separator"></div>
+<div class="section" id="string">
+<h1><a class="toc-backref" href="./classes.html#id1398">string</a></h1>
+<div class="section" id="id112">
+<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
+<p><tt class="literal"><span class="pre">string</span></tt> is a <a class="reference internal" href="./variadic-sequence.html#variadic">variadic</a>, <a class="reference internal" href="./bidirectional-sequence.html">bidirectional</a>, <a class="reference internal" href="./extensible-sequence.html">extensible</a> <a class="reference internal" href="./integral-sequence-wrapper.html">Integral Sequence Wrapper</a> of
+characters that supports amortized constant-time insertion and removal of elements at both ends,
+and linear-time insertion and removal of elements in the middle. The parameters to <tt class="literal"><span class="pre">string</span></tt>
+are multi-character literals, giving a somewhat readable syntax for compile-time strings.
+<tt class="literal"><span class="pre">string</span></tt> can also be an argument to the <tt class="literal"><span class="pre">c_str</span></tt> metafunction, which generates a
+null-terminated character array that facilitates interoperability with runtime string
+processing routines.</p>
+</div>
+<div class="section" id="id115">
+<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
+<table border="1" class="docutils table">
+<colgroup>
+<col width="26%" />
+<col width="74%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Sequence form</th>
+<th class="head">Header</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>Variadic</td>
+<td><tt class="literal"><span class="pre">#include &lt;boost/mpl/string.hpp&gt;</span></tt></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id116">
+<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
+<ul class="simple">
+<li><a class="reference internal" href="./integral-sequence-wrapper.html">Integral Sequence Wrapper</a></li>
+<li><a class="reference internal" href="./variadic-sequence.html">Variadic Sequence</a></li>
+<li><a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a></li>
+<li><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></li>
+<li><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></li>
+<li><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></li>
+</ul>
+</div>
+<div class="section" id="id117">
+<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
+<p>In the following table, <tt class="literal"><span class="pre">s</span></tt> is an instance of <tt class="literal"><span class="pre">string</span></tt>, <tt class="literal"><span class="pre">pos</span></tt> and <tt class="literal"><span class="pre">last</span></tt> are iterators
+into <tt class="literal"><span class="pre">s</span></tt>, <tt class="literal"><span class="pre">r</span></tt> is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of characters, <tt class="literal"><span class="pre">n</span></tt> and <tt class="literal"><span class="pre">x</span></tt> are <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s,
+and <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub> are arbitrary (multi-)characters.</p>
+<table border="1" class="docutils table">
+<colgroup>
+<col width="40%" />
+<col width="60%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Expression</th>
+<th class="head">Semantics</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><pre class="first last literal-block">
+string&lt;<em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>&gt;
+</pre>
+</td>
+<td><tt class="literal"><span class="pre">string</span></tt> of characters <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>; see
+<a class="reference internal" href="./variadic-sequence.html">Variadic Sequence</a>.</td>
+</tr>
+<tr><td><pre class="first last literal-block">
+string&lt;<em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>&gt;::type
+</pre>
+</td>
+<td>Identical to <tt class="literal"><span class="pre">string&lt;</span></tt><em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub><tt class="literal"><span class="pre">&gt;</span></tt>;
+see <a class="reference internal" href="./variadic-sequence.html">Variadic Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">begin&lt;s&gt;::type</span></tt></td>
+<td>An iterator pointing to the beginning of <tt class="literal"><span class="pre">s</span></tt>;
+see <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">end&lt;s&gt;::type</span></tt></td>
+<td>An iterator pointing to the end of <tt class="literal"><span class="pre">s</span></tt>;
+see <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">size&lt;s&gt;::type</span></tt></td>
+<td>The size of <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">empty&lt;s&gt;::type</span></tt></td>
+<td>A boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that
+<tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if the sequence is empty;
+see <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">front&lt;s&gt;::type</span></tt></td>
+<td>The first element in <tt class="literal"><span class="pre">s</span></tt>; see
+<a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">back&lt;s&gt;::type</span></tt></td>
+<td>The last element in <tt class="literal"><span class="pre">s</span></tt>; see
+<a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">insert&lt;s,pos,x&gt;::type</span></tt></td>
+<td>A new <tt class="literal"><span class="pre">string</span></tt> of following elements:
+[<tt class="literal"><span class="pre">begin&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>), <tt class="literal"><span class="pre">x</span></tt>,
+[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre">end&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">insert_range&lt;s,pos,r&gt;::type</span></tt></td>
+<td>A new <tt class="literal"><span class="pre">string</span></tt> of following elements:
+[<tt class="literal"><span class="pre">begin&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
+[<tt class="literal"><span class="pre">begin&lt;r&gt;::type</span></tt>, <tt class="literal"><span class="pre">end&lt;r&gt;::type</span></tt>)
+[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre">end&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">erase&lt;s,pos&gt;::type</span></tt></td>
+<td>A new <tt class="literal"><span class="pre">string</span></tt> of following elements:
+[<tt class="literal"><span class="pre">begin&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
+[<tt class="literal"><span class="pre">next&lt;pos&gt;::type</span></tt>, <tt class="literal"><span class="pre">end&lt;s&gt;::type</span></tt>); see
+<a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">erase&lt;s,pos,last&gt;::type</span></tt></td>
+<td>A new <tt class="literal"><span class="pre">string</span></tt> of following elements:
+[<tt class="literal"><span class="pre">begin&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
+[<tt class="literal"><span class="pre">last</span></tt>, <tt class="literal"><span class="pre">end&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">clear&lt;s&gt;::type</span></tt></td>
+<td>An empty <tt class="literal"><span class="pre">string</span></tt>; see <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">push_back&lt;s,x&gt;::type</span></tt></td>
+<td>A new <tt class="literal"><span class="pre">string</span></tt> of following elements:
+[<tt class="literal"><span class="pre">begin&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">end&lt;s&gt;::type</span></tt>), <tt class="literal"><span class="pre">x</span></tt>;
+see <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">pop_back&lt;s&gt;::type</span></tt></td>
+<td>A new <tt class="literal"><span class="pre">string</span></tt> of following elements:
+[<tt class="literal"><span class="pre">begin&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">prior&lt;</span> <span class="pre">end&lt;s&gt;::type</span> <span class="pre">&gt;::type</span></tt>);
+see <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">push_front&lt;s,x&gt;::type</span></tt></td>
+<td>A new <tt class="literal"><span class="pre">string</span></tt> of following elements:
+[<tt class="literal"><span class="pre">begin&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">end&lt;s&gt;::type</span></tt>), <tt class="literal"><span class="pre">x</span></tt>; see <a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">pop_front&lt;s&gt;::type</span></tt></td>
+<td>A new <tt class="literal"><span class="pre">string</span></tt> of following elements:
+[<tt class="literal"><span class="pre">next&lt;</span> <span class="pre">begin&lt;s&gt;::type</span> <span class="pre">&gt;::type</span></tt>, <tt class="literal"><span class="pre">end&lt;s&gt;::type</span></tt>);
+see <a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a>.</td>
+</tr>
+<tr><td><tt class="literal"><span class="pre">c_str&lt;s&gt;::value</span></tt></td>
+<td>A null-terminated byte string such that
+<tt class="literal"><span class="pre">c_str&lt;s&gt;::value[</span></tt><em>n</em><tt class="literal"><span class="pre">]</span></tt> is equal to the <em>n</em>-th
+character in <tt class="literal"><span class="pre">s</span></tt>, and
+<tt class="literal"><span class="pre">c_str&lt;s&gt;::value[size&lt;s&gt;::type::value]</span></tt> is <tt class="literal"><span class="pre">'\0'</span></tt>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="id118">
+<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
+<pre class="literal-block">
+typedef mpl::string&lt;'hell','o wo','rld'&gt; hello;
+typedef mpl::push_back&lt;hello, mpl::char_&lt;'!'&gt; &gt;::type hello2;
+
+BOOST_ASSERT(0 == std::strcmp(mpl::c_str&lt;hello2&gt;::value, &quot;hello world!"));
+</pre>
+</div>
+<div class="section" id="id119">
+<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
+<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./variadic-sequence.html">Variadic Sequence</a>, <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./integral-sequence-wrapper.html">Integral Sequence Wrapper</a>, <a class="reference internal" href="./char.html">char_</a>, <a class="reference internal" href="./c-str.html">c_str</a></p>
+</div>
+</div>
+
+<div class="footer-separator"></div>
+<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group">Prev&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Up&nbsp;Home</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Full TOC</span></td>
+<td><div class="copyright-footer"><div class="copyright">Copyright © 2009 Eric Niebler</div>
+Distributed under the Boost Software License, Version 1.0. (See accompanying
+file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt>)</div></td></tr></table></body>
+</html>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk