add doc: char_traits integer type operations

This commit is contained in:
Bolero-MURAKAMI 2013-09-05 15:31:02 +09:00
parent 3107804d87
commit 0ef068c92b
24 changed files with 1362 additions and 31 deletions

View file

@ -0,0 +1,39 @@
.. _sprout-string-char_traits-eof:
###############################################################################
eof
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR int_type eof() SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::eof()``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
#include <cstdio>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR char x = char_traits<char>::eof();
static_assert(x == EOF, "x is equivalent to EOF.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-char_traits-eq_int_type:
###############################################################################
eq_int_type
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR bool eq_int_type(int_type c1, int_type c2) SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::eq_int_type(c1, c2)``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR int x = 'H';
SPROUT_STATIC_CONSTEXPR int y = 'H';
SPROUT_STATIC_CONSTEXPR auto result = char_traits<char>::eq_int_type(x, y);
static_assert(result, "x is equal to y.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -7,7 +7,7 @@ char_traits
:hidden:
assign
rq
eq
lt
compare
length
@ -15,6 +15,11 @@ char_traits
move
copy
assign-string
not_eof
to_char_type
to_int_type
eq_int_type
eof
Interface
========================================

View file

@ -0,0 +1,39 @@
.. _sprout-string-char_traits-not_eof:
###############################################################################
not_eof
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR int_type not_eof(int_type c) SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::not_eof(c)``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR char x = 'H';
SPROUT_STATIC_CONSTEXPR auto result = char_traits<char>::not_eof(x);
static_assert(result, "x is not EOF.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-char_traits-to_char_type:
###############################################################################
to_char_type
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR char_type to_char_type(int_type c) SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::to_char_type(c)``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR int x = 'H';
SPROUT_STATIC_CONSTEXPR auto y = char_traits<char>::to_char_type(x);
SPROUT_STATIC_CONSTEXPR auto result = char_traits<char>::to_int_type(y);
static_assert(char_traits<char>::eq_int_type(result, x), "a value that converted from x to char type and re-converted to int type is equal to the original x.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-char_traits-to_int_type:
###############################################################################
to_int_type
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR int_type to_int_type(char_type c) SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::to_int_type(c)``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR int x = 'H';
SPROUT_STATIC_CONSTEXPR auto y = char_traits<char>::to_char_type(x);
SPROUT_STATIC_CONSTEXPR auto result = char_traits<char>::to_int_type(y);
static_assert(char_traits<char>::eq_int_type(result, x), "a value that converted from x to char type and re-converted to int type is equal to the original x.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -39,7 +39,7 @@
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="Sprout.String" href="../index.html" />
<link rel="next" title="operator+" href="operator-plus.html" />
<link rel="prev" title="assign" href="../char_traits/assign-string.html" />
<link rel="prev" title="eof" href="../char_traits/eof.html" />
</head>
<body>
<div class="related">
@ -52,7 +52,7 @@
<a href="operator-plus.html" title="operator+"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../char_traits/assign-string.html" title="assign"
<a href="../char_traits/eof.html" title="eof"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
@ -75,8 +75,8 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../char_traits/assign-string.html"
title="previous chapter">assign</a></p>
<p class="topless"><a href="../char_traits/eof.html"
title="previous chapter">eof</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="operator-plus.html"
title="next chapter">operator+</a></p>
@ -173,7 +173,7 @@
<a href="operator-plus.html" title="operator+"
>next</a> |</li>
<li class="right" >
<a href="../char_traits/assign-string.html" title="assign"
<a href="../char_traits/eof.html" title="eof"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>

View file

@ -38,7 +38,7 @@
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="swap" href="../basic_string/swap-global.html" />
<link rel="next" title="not_eof" href="not_eof.html" />
<link rel="prev" title="copy" href="copy.html" />
</head>
<body>
@ -49,7 +49,7 @@
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../basic_string/swap-global.html" title="swap"
<a href="not_eof.html" title="not_eof"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="copy.html" title="copy"
@ -78,8 +78,8 @@
<p class="topless"><a href="copy.html"
title="previous chapter">copy</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../basic_string/swap-global.html"
title="next chapter">swap</a></p>
<p class="topless"><a href="not_eof.html"
title="next chapter">not_eof</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/string/char_traits/assign-string.txt"
@ -160,7 +160,7 @@
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../basic_string/swap-global.html" title="swap"
<a href="not_eof.html" title="not_eof"
>next</a> |</li>
<li class="right" >
<a href="copy.html" title="copy"

View file

@ -38,7 +38,7 @@
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="lt" href="lt.html" />
<link rel="next" title="eq" href="eq.html" />
<link rel="prev" title="char_traits" href="index.html" />
</head>
<body>
@ -49,7 +49,7 @@
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="lt.html" title="lt"
<a href="eq.html" title="eq"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="char_traits"
@ -78,8 +78,8 @@
<p class="topless"><a href="index.html"
title="previous chapter">char_traits</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="lt.html"
title="next chapter">lt</a></p>
<p class="topless"><a href="eq.html"
title="next chapter">eq</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/string/char_traits/assign.txt"
@ -161,7 +161,7 @@
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="lt.html" title="lt"
<a href="eq.html" title="eq"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="char_traits"

View file

@ -0,0 +1,179 @@
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-43764535-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>eof &mdash; Sprout 1.0 documentation</title>
<link rel="stylesheet" href="../../../_static/sphinxdoc.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="swap" href="../basic_string/swap-global.html" />
<link rel="prev" title="eq_int_type" href="eq_int_type.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../basic_string/swap-global.html" title="swap"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="eq_int_type.html" title="eq_int_type"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" accesskey="U">char_traits</a> &raquo;</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">eof</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#effects">Effects</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#complexity">Complexity</a></li>
<li><a class="reference internal" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="eq_int_type.html"
title="previous chapter">eq_int_type</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../basic_string/swap-global.html"
title="next chapter">swap</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/string/char_traits/eof.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="eof">
<h1>eof<a class="headerlink" href="#eof" title="Permalink to this headline"></a></h1>
<div class="section" id="interface">
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">static</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">int_type</span> <span class="n">eof</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></div>
</div>
</div>
<div class="section" id="effects">
<h2>Effects<a class="headerlink" href="#effects" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">Equivalent to <tt class="docutils literal"><span class="pre">std::char_traits&lt;Char&gt;::eof()</span></tt>.</div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/string.hpp&gt;</span>
<span class="cp">#include &lt;cstdio&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="kt">char</span> <span class="n">x</span> <span class="o">=</span> <span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">eof</span><span class="p">();</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">x</span> <span class="o">==</span> <span class="n">EOF</span><span class="p">,</span> <span class="s">&quot;x is equivalent to EOF.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="complexity">
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">constant.</div>
<div class="line">Recursive function invocations in <em>O(1)</em> (constant) depth.</div>
</div>
</div>
<div class="section" id="header">
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line"><tt class="docutils literal"><span class="pre">sprout/string/char_traits.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/string.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../basic_string/swap-global.html" title="swap"
>next</a> |</li>
<li class="right" >
<a href="eq_int_type.html" title="eq_int_type"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" >char_traits</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>

View file

@ -36,7 +36,10 @@
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="lt" href="lt.html" />
<link rel="prev" title="assign" href="assign.html" />
</head>
<body>
<div class="related">
@ -45,7 +48,16 @@
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li class="right" >
<a href="lt.html" title="lt"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="assign.html" title="assign"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" accesskey="U">char_traits</a> &raquo;</li>
</ul>
</div>
<div class="sphinxsidebar">
@ -62,6 +74,12 @@
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="assign.html"
title="previous chapter">assign</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="lt.html"
title="next chapter">lt</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/string/char_traits/eq.txt"
@ -142,7 +160,16 @@
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li class="right" >
<a href="lt.html" title="lt"
>next</a> |</li>
<li class="right" >
<a href="assign.html" title="assign"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" >char_traits</a> &raquo;</li>
</ul>
</div>
<div class="footer">

View file

@ -0,0 +1,180 @@
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-43764535-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>eq_int_type &mdash; Sprout 1.0 documentation</title>
<link rel="stylesheet" href="../../../_static/sphinxdoc.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="eof" href="eof.html" />
<link rel="prev" title="to_int_type" href="to_int_type.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="eof.html" title="eof"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="to_int_type.html" title="to_int_type"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" accesskey="U">char_traits</a> &raquo;</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">eq_int_type</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#effects">Effects</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#complexity">Complexity</a></li>
<li><a class="reference internal" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="to_int_type.html"
title="previous chapter">to_int_type</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="eof.html"
title="next chapter">eof</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/string/char_traits/eq_int_type.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="eq-int-type">
<h1>eq_int_type<a class="headerlink" href="#eq-int-type" title="Permalink to this headline"></a></h1>
<div class="section" id="interface">
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">static</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span> <span class="n">eq_int_type</span><span class="p">(</span><span class="n">int_type</span> <span class="n">c1</span><span class="p">,</span> <span class="n">int_type</span> <span class="n">c2</span><span class="p">)</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></div>
</div>
</div>
<div class="section" id="effects">
<h2>Effects<a class="headerlink" href="#effects" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">Equivalent to <tt class="docutils literal"><span class="pre">std::char_traits&lt;Char&gt;::eq_int_type(c1,</span> <span class="pre">c2)</span></tt>.</div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/string.hpp&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="kt">int</span> <span class="n">x</span> <span class="o">=</span> <span class="sc">&#39;H&#39;</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="kt">int</span> <span class="n">y</span> <span class="o">=</span> <span class="sc">&#39;H&#39;</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">result</span> <span class="o">=</span> <span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">eq_int_type</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="s">&quot;x is equal to y.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="complexity">
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">constant.</div>
<div class="line">Recursive function invocations in <em>O(1)</em> (constant) depth.</div>
</div>
</div>
<div class="section" id="header">
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line"><tt class="docutils literal"><span class="pre">sprout/string/char_traits.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/string.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="eof.html" title="eof"
>next</a> |</li>
<li class="right" >
<a href="to_int_type.html" title="to_int_type"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" >char_traits</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>

View file

@ -283,19 +283,19 @@
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="xref doc docutils literal"><span class="pre">not_eof</span></tt></td>
<tr class="row-even"><td><a class="reference internal" href="not_eof.html"><em>not_eof</em></a></td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="xref doc docutils literal"><span class="pre">to_char_type</span></tt></td>
<tr class="row-odd"><td><a class="reference internal" href="to_char_type.html"><em>to_char_type</em></a></td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="xref doc docutils literal"><span class="pre">to_int_type</span></tt></td>
<tr class="row-even"><td><a class="reference internal" href="to_int_type.html"><em>to_int_type</em></a></td>
<td>&nbsp;</td>
</tr>
<tr class="row-odd"><td><tt class="xref doc docutils literal"><span class="pre">eq_int_type</span></tt></td>
<tr class="row-odd"><td><a class="reference internal" href="eq_int_type.html"><em>eq_int_type</em></a></td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><tt class="xref doc docutils literal"><span class="pre">eof</span></tt></td>
<tr class="row-even"><td><a class="reference internal" href="eof.html"><em>eof</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>

View file

@ -39,7 +39,7 @@
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="compare" href="compare.html" />
<link rel="prev" title="assign" href="assign.html" />
<link rel="prev" title="eq" href="eq.html" />
</head>
<body>
<div class="related">
@ -52,7 +52,7 @@
<a href="compare.html" title="compare"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="assign.html" title="assign"
<a href="eq.html" title="eq"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
@ -75,8 +75,8 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="assign.html"
title="previous chapter">assign</a></p>
<p class="topless"><a href="eq.html"
title="previous chapter">eq</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="compare.html"
title="next chapter">compare</a></p>
@ -164,7 +164,7 @@
<a href="compare.html" title="compare"
>next</a> |</li>
<li class="right" >
<a href="assign.html" title="assign"
<a href="eq.html" title="eq"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>

View file

@ -0,0 +1,179 @@
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-43764535-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>not_eof &mdash; Sprout 1.0 documentation</title>
<link rel="stylesheet" href="../../../_static/sphinxdoc.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="to_char_type" href="to_char_type.html" />
<link rel="prev" title="assign" href="assign-string.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="to_char_type.html" title="to_char_type"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="assign-string.html" title="assign"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" accesskey="U">char_traits</a> &raquo;</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">not_eof</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#effects">Effects</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#complexity">Complexity</a></li>
<li><a class="reference internal" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="assign-string.html"
title="previous chapter">assign</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="to_char_type.html"
title="next chapter">to_char_type</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/string/char_traits/not_eof.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="not-eof">
<h1>not_eof<a class="headerlink" href="#not-eof" title="Permalink to this headline"></a></h1>
<div class="section" id="interface">
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">static</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">int_type</span> <span class="n">not_eof</span><span class="p">(</span><span class="n">int_type</span> <span class="n">c</span><span class="p">)</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></div>
</div>
</div>
<div class="section" id="effects">
<h2>Effects<a class="headerlink" href="#effects" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">Equivalent to <tt class="docutils literal"><span class="pre">std::char_traits&lt;Char&gt;::not_eof(c)</span></tt>.</div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/string.hpp&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="kt">char</span> <span class="n">x</span> <span class="o">=</span> <span class="sc">&#39;H&#39;</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">result</span> <span class="o">=</span> <span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">not_eof</span><span class="p">(</span><span class="n">x</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="s">&quot;x is not EOF.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="complexity">
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">constant.</div>
<div class="line">Recursive function invocations in <em>O(1)</em> (constant) depth.</div>
</div>
</div>
<div class="section" id="header">
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line"><tt class="docutils literal"><span class="pre">sprout/string/char_traits.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/string.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="to_char_type.html" title="to_char_type"
>next</a> |</li>
<li class="right" >
<a href="assign-string.html" title="assign"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" >char_traits</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>

View file

@ -0,0 +1,180 @@
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-43764535-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>to_char_type &mdash; Sprout 1.0 documentation</title>
<link rel="stylesheet" href="../../../_static/sphinxdoc.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="to_int_type" href="to_int_type.html" />
<link rel="prev" title="not_eof" href="not_eof.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="to_int_type.html" title="to_int_type"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="not_eof.html" title="not_eof"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" accesskey="U">char_traits</a> &raquo;</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">to_char_type</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#effects">Effects</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#complexity">Complexity</a></li>
<li><a class="reference internal" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="not_eof.html"
title="previous chapter">not_eof</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="to_int_type.html"
title="next chapter">to_int_type</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/string/char_traits/to_char_type.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="to-char-type">
<h1>to_char_type<a class="headerlink" href="#to-char-type" title="Permalink to this headline"></a></h1>
<div class="section" id="interface">
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">static</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">char_type</span> <span class="n">to_char_type</span><span class="p">(</span><span class="n">int_type</span> <span class="n">c</span><span class="p">)</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></div>
</div>
</div>
<div class="section" id="effects">
<h2>Effects<a class="headerlink" href="#effects" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">Equivalent to <tt class="docutils literal"><span class="pre">std::char_traits&lt;Char&gt;::to_char_type(c)</span></tt>.</div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/string.hpp&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="kt">int</span> <span class="n">x</span> <span class="o">=</span> <span class="sc">&#39;H&#39;</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">y</span> <span class="o">=</span> <span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">to_char_type</span><span class="p">(</span><span class="n">x</span><span class="p">);</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">result</span> <span class="o">=</span> <span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">to_int_type</span><span class="p">(</span><span class="n">y</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">eq_int_type</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">x</span><span class="p">),</span> <span class="s">&quot;a value that converted from x to char type and re-converted to int type is equal to the original x.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="complexity">
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">constant.</div>
<div class="line">Recursive function invocations in <em>O(1)</em> (constant) depth.</div>
</div>
</div>
<div class="section" id="header">
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line"><tt class="docutils literal"><span class="pre">sprout/string/char_traits.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/string.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="to_int_type.html" title="to_int_type"
>next</a> |</li>
<li class="right" >
<a href="not_eof.html" title="not_eof"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" >char_traits</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>

View file

@ -0,0 +1,180 @@
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-43764535-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>to_int_type &mdash; Sprout 1.0 documentation</title>
<link rel="stylesheet" href="../../../_static/sphinxdoc.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '1.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../_static/underscore.js"></script>
<script type="text/javascript" src="../../../_static/doctools.js"></script>
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="char_traits" href="index.html" />
<link rel="next" title="eq_int_type" href="eq_int_type.html" />
<link rel="prev" title="to_char_type" href="to_char_type.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="eq_int_type.html" title="eq_int_type"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="to_char_type.html" title="to_char_type"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" accesskey="U">char_traits</a> &raquo;</li>
</ul>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">to_int_type</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#effects">Effects</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#complexity">Complexity</a></li>
<li><a class="reference internal" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="to_char_type.html"
title="previous chapter">to_char_type</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="eq_int_type.html"
title="next chapter">eq_int_type</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/string/char_traits/to_int_type.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="to-int-type">
<h1>to_int_type<a class="headerlink" href="#to-int-type" title="Permalink to this headline"></a></h1>
<div class="section" id="interface">
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">static</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">int_type</span> <span class="n">to_int_type</span><span class="p">(</span><span class="n">char_type</span> <span class="n">c</span><span class="p">)</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></div>
</div>
</div>
<div class="section" id="effects">
<h2>Effects<a class="headerlink" href="#effects" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">Equivalent to <tt class="docutils literal"><span class="pre">std::char_traits&lt;Char&gt;::to_int_type(c)</span></tt>.</div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/string.hpp&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="kt">int</span> <span class="n">x</span> <span class="o">=</span> <span class="sc">&#39;H&#39;</span><span class="p">;</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">y</span> <span class="o">=</span> <span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">to_char_type</span><span class="p">(</span><span class="n">x</span><span class="p">);</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">result</span> <span class="o">=</span> <span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">to_int_type</span><span class="p">(</span><span class="n">y</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">char_traits</span><span class="o">&lt;</span><span class="kt">char</span><span class="o">&gt;::</span><span class="n">eq_int_type</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">x</span><span class="p">),</span> <span class="s">&quot;a value that converted from x to char type and re-converted to int type is equal to the original x.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="complexity">
<h2>Complexity<a class="headerlink" href="#complexity" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">constant.</div>
<div class="line">Recursive function invocations in <em>O(1)</em> (constant) depth.</div>
</div>
</div>
<div class="section" id="header">
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line"><tt class="docutils literal"><span class="pre">sprout/string/char_traits.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/string.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="eq_int_type.html" title="eq_int_type"
>next</a> |</li>
<li class="right" >
<a href="to_char_type.html" title="to_char_type"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout 1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.String</a> &raquo;</li>
<li><a href="index.html" >char_traits</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,39 @@
.. _sprout-string-char_traits-eof:
###############################################################################
eof
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR int_type eof() SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::eof()``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
#include <cstdio>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR char x = char_traits<char>::eof();
static_assert(x == EOF, "x is equivalent to EOF.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-char_traits-eq_int_type:
###############################################################################
eq_int_type
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR bool eq_int_type(int_type c1, int_type c2) SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::eq_int_type(c1, c2)``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR int x = 'H';
SPROUT_STATIC_CONSTEXPR int y = 'H';
SPROUT_STATIC_CONSTEXPR auto result = char_traits<char>::eq_int_type(x, y);
static_assert(result, "x is equal to y.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -7,7 +7,7 @@ char_traits
:hidden:
assign
rq
eq
lt
compare
length
@ -15,6 +15,11 @@ char_traits
move
copy
assign-string
not_eof
to_char_type
to_int_type
eq_int_type
eof
Interface
========================================

View file

@ -0,0 +1,39 @@
.. _sprout-string-char_traits-not_eof:
###############################################################################
not_eof
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR int_type not_eof(int_type c) SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::not_eof(c)``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR char x = 'H';
SPROUT_STATIC_CONSTEXPR auto result = char_traits<char>::not_eof(x);
static_assert(result, "x is not EOF.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-char_traits-to_char_type:
###############################################################################
to_char_type
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR char_type to_char_type(int_type c) SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::to_char_type(c)``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR int x = 'H';
SPROUT_STATIC_CONSTEXPR auto y = char_traits<char>::to_char_type(x);
SPROUT_STATIC_CONSTEXPR auto result = char_traits<char>::to_int_type(y);
static_assert(char_traits<char>::eq_int_type(result, x), "a value that converted from x to char type and re-converted to int type is equal to the original x.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``

View file

@ -0,0 +1,40 @@
.. _sprout-string-char_traits-to_int_type:
###############################################################################
to_int_type
###############################################################################
Interface
========================================
.. sourcecode:: c++
static SPROUT_CONSTEXPR int_type to_int_type(char_type c) SPROUT_NOEXCEPT;
Effects
========================================
| Equivalent to ``std::char_traits<Char>::to_int_type(c)``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/string.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR int x = 'H';
SPROUT_STATIC_CONSTEXPR auto y = char_traits<char>::to_char_type(x);
SPROUT_STATIC_CONSTEXPR auto result = char_traits<char>::to_int_type(y);
static_assert(char_traits<char>::eq_int_type(result, x), "a value that converted from x to char type and re-converted to int type is equal to the original x.");
Complexity
========================================
| constant.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/string/char_traits.hpp``
| Convenience header: ``sprout/string.hpp``