This commit is contained in:
Bolero-MURAKAMI 2013-09-09 09:58:28 +09:00
parent 939b4e26ce
commit e312af77fc
23 changed files with 60 additions and 62 deletions

View file

@ -31,7 +31,7 @@ Examples
auto x = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
x.assign(0);
SPROUT_ASSERT_MSG(x[0] = 0, "filled with 0.");
SPROUT_ASSERT_MSG(x[0] == 0, "filled with 0.");
.. sourcecode:: c++
@ -40,7 +40,7 @@ Examples
SPROUT_STATIC_CONSTEXPR auto x = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
SPROUT_STATIC_CONSTEXPR auto y = x.assign(0);
static_assert(y[0] = 0, "filled with 0.");
static_assert(y[0] == 0, "filled with 0.");
Complexity
========================================

View file

@ -1,6 +1,6 @@
.. _sprout-array-array-c_array:
###############################################################################
back
c_array
###############################################################################
Interface

View file

@ -1,13 +1,13 @@
.. _sprout-array-array-cbegin:
.. _sprout-array-array-cend:
###############################################################################
cbegin
cend
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT;
Returns
========================================
@ -22,7 +22,7 @@ Examples
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*(input.cbegin() - 1) == 10, "input last element is 10.");
static_assert(*(input.cend() - 1) == 10, "input last element is 10.");
Complexity
========================================

View file

@ -1,6 +1,6 @@
.. _sprout-array-array-data:
###############################################################################
back
data
###############################################################################
Interface

View file

@ -12,7 +12,7 @@ Interface
Returns
========================================
| true if the string size is 0, false otherwise.
| true if the array size is 0, false otherwise.
Examples
========================================

View file

@ -24,7 +24,7 @@ Examples
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*(input.end() - 1) == 1, "input last element is 10.");
static_assert(*(input.end() - 1) == 10, "input last element is 10.");
Complexity
========================================

View file

@ -31,7 +31,7 @@ Examples
auto x = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
x.fill(0);
SPROUT_ASSERT_MSG(x[0] = 0, "filled with 0.");
SPROUT_ASSERT_MSG(x[0] == 0, "filled with 0.");
.. sourcecode:: c++
@ -40,7 +40,7 @@ Examples
SPROUT_STATIC_CONSTEXPR auto x = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
SPROUT_STATIC_CONSTEXPR auto y = x.fill(0);
static_assert(y[0] = 0, "filled with 0.");
static_assert(y[0] == 0, "filled with 0.");
Complexity
========================================

View file

@ -18,7 +18,7 @@ Effects
| ``std::copy(rhs.begin(), rhs.end(), begin())``.
| or
| ``std::move(rhs.begin(), rhs.end(), begin())``.
| ``std::move(rhs.begin(), rhs.end(), begin())``.
Returns
========================================

View file

@ -30,7 +30,7 @@ Examples
auto x = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
auto y = array<int, 10>{{10, 9, 8, 7, 6, 5, 4, 3, 2, 1}};
x.swap(y);
SPROUT_ASSERT_MSG(x[0] = 10 && y[0] == 1, "each element are swapped.");
SPROUT_ASSERT_MSG(x[0] == 10 && y[0] == 1, "each element are swapped.");
Complexity
========================================

View file

@ -137,7 +137,7 @@
<span class="k">auto</span> <span class="n">x</span> <span class="o">=</span> <span class="n">array</span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">&gt;</span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">}};</span>
<span class="n">x</span><span class="p">.</span><span class="n">assign</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<span class="n">SPROUT_ASSERT_MSG</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;filled with 0.&quot;</span><span class="p">);</span>
<span class="n">SPROUT_ASSERT_MSG</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;filled with 0.&quot;</span><span class="p">);</span>
</pre></div>
</div>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/array.hpp&gt;</span>
@ -145,7 +145,7 @@
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">x</span> <span class="o">=</span> <span class="n">array</span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">&gt;</span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</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">x</span><span class="p">.</span><span class="n">assign</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;filled with 0.&quot;</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;filled with 0.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>

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="array" href="index.html" />
<link rel="next" title="back" href="data.html" />
<link rel="next" title="data" href="data.html" />
<link rel="prev" title="front" href="front.html" />
</head>
<body>
@ -49,7 +49,7 @@
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="data.html" title="back"
<a href="data.html" title="data"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="front.html" title="front"
@ -79,7 +79,7 @@
title="previous chapter">front</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="data.html"
title="next chapter">back</a></p>
title="next chapter">data</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/array/array/back.txt"
@ -160,7 +160,7 @@
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="data.html" title="back"
<a href="data.html" title="data"
>next</a> |</li>
<li class="right" >
<a href="front.html" title="front"

View file

@ -19,7 +19,7 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>back &mdash; Sprout 1.0 documentation</title>
<title>c_array &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" />
@ -39,7 +39,7 @@
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="array" href="index.html" />
<link rel="next" title="swap" href="swap-global.html" />
<link rel="prev" title="back" href="data.html" />
<link rel="prev" title="data" href="data.html" />
</head>
<body>
<div class="related">
@ -52,7 +52,7 @@
<a href="swap-global.html" title="swap"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="data.html" title="back"
<a href="data.html" title="data"
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>
@ -64,7 +64,7 @@
<div class="sphinxsidebarwrapper">
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">back</a><ul>
<li><a class="reference internal" href="#">c_array</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#returns">Returns</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
@ -76,7 +76,7 @@
<h4>Previous topic</h4>
<p class="topless"><a href="data.html"
title="previous chapter">back</a></p>
title="previous chapter">data</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="swap-global.html"
title="next chapter">swap</a></p>
@ -106,8 +106,8 @@
<div class="bodywrapper">
<div class="body">
<div class="section" id="back">
<h1>back<a class="headerlink" href="#back" title="Permalink to this headline"></a></h1>
<div class="section" id="c-array">
<h1>c_array<a class="headerlink" href="#c-array" 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="n">pointer</span> <span class="n">c_array</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
@ -163,7 +163,7 @@
<a href="swap-global.html" title="swap"
>next</a> |</li>
<li class="right" >
<a href="data.html" title="back"
<a href="data.html" title="data"
>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="array" href="index.html" />
<link rel="next" title="cbegin" href="cend.html" />
<link rel="next" title="cend" href="cend.html" />
<link rel="prev" title="rend" href="rend.html" />
</head>
<body>
@ -49,7 +49,7 @@
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="cend.html" title="cbegin"
<a href="cend.html" title="cend"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="rend.html" title="rend"
@ -79,7 +79,7 @@
title="previous chapter">rend</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="cend.html"
title="next chapter">cbegin</a></p>
title="next chapter">cend</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/array/array/cbegin.txt"
@ -158,7 +158,7 @@
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="cend.html" title="cbegin"
<a href="cend.html" title="cend"
>next</a> |</li>
<li class="right" >
<a href="rend.html" title="rend"

View file

@ -19,7 +19,7 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>cbegin &mdash; Sprout 1.0 documentation</title>
<title>cend &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" />
@ -64,7 +64,7 @@
<div class="sphinxsidebarwrapper">
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">cbegin</a><ul>
<li><a class="reference internal" href="#">cend</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#returns">Returns</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
@ -106,11 +106,11 @@
<div class="bodywrapper">
<div class="body">
<div class="section" id="cbegin">
<h1>cbegin<a class="headerlink" href="#cbegin" title="Permalink to this headline"></a></h1>
<div class="section" id="cend">
<h1>cend<a class="headerlink" href="#cend" 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="n">SPROUT_CONSTEXPR</span> <span class="n">const_iterator</span> <span class="n">cbegin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<div class="highlight-c++"><div class="highlight"><pre><span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_iterator</span> <span class="n">cend</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></div>
</div>
</div>
@ -126,7 +126,7 @@
<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="k">auto</span> <span class="n">input</span> <span class="o">=</span> <span class="n">array</span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">&gt;</span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">}};</span>
<span class="n">static_assert</span><span class="p">(</span><span class="o">*</span><span class="p">(</span><span class="n">input</span><span class="p">.</span><span class="n">cbegin</span><span class="p">()</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;input last element is 10.&quot;</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="o">*</span><span class="p">(</span><span class="n">input</span><span class="p">.</span><span class="n">cend</span><span class="p">()</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;input last element is 10.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>

View file

@ -39,7 +39,7 @@
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="array" href="index.html" />
<link rel="next" title="crend" href="crend.html" />
<link rel="prev" title="cbegin" href="cend.html" />
<link rel="prev" title="cend" href="cend.html" />
</head>
<body>
<div class="related">
@ -52,7 +52,7 @@
<a href="crend.html" title="crend"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="cend.html" title="cbegin"
<a href="cend.html" title="cend"
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>
@ -76,7 +76,7 @@
<h4>Previous topic</h4>
<p class="topless"><a href="cend.html"
title="previous chapter">cbegin</a></p>
title="previous chapter">cend</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="crend.html"
title="next chapter">crend</a></p>
@ -161,7 +161,7 @@
<a href="crend.html" title="crend"
>next</a> |</li>
<li class="right" >
<a href="cend.html" title="cbegin"
<a href="cend.html" title="cend"
>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

@ -19,7 +19,7 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<title>back &mdash; Sprout 1.0 documentation</title>
<title>data &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" />
@ -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="array" href="index.html" />
<link rel="next" title="back" href="c_array.html" />
<link rel="next" title="c_array" href="c_array.html" />
<link rel="prev" title="back" href="back.html" />
</head>
<body>
@ -49,7 +49,7 @@
<a href="../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="c_array.html" title="back"
<a href="c_array.html" title="c_array"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="back.html" title="back"
@ -64,7 +64,7 @@
<div class="sphinxsidebarwrapper">
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">back</a><ul>
<li><a class="reference internal" href="#">data</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#returns">Returns</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
@ -79,7 +79,7 @@
title="previous chapter">back</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="c_array.html"
title="next chapter">back</a></p>
title="next chapter">c_array</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../_sources/libs/array/array/data.txt"
@ -106,8 +106,8 @@
<div class="bodywrapper">
<div class="body">
<div class="section" id="back">
<h1>back<a class="headerlink" href="#back" title="Permalink to this headline"></a></h1>
<div class="section" id="data">
<h1>data<a class="headerlink" href="#data" 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="n">pointer</span> <span class="n">data</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
@ -160,7 +160,7 @@
<a href="../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="c_array.html" title="back"
<a href="c_array.html" title="c_array"
>next</a> |</li>
<li class="right" >
<a href="back.html" title="back"

View file

@ -117,7 +117,7 @@
<div class="section" id="returns">
<h2>Returns<a class="headerlink" href="#returns" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">true if the string size is 0, false otherwise.</div>
<div class="line">true if the array size is 0, false otherwise.</div>
</div>
</div>
<div class="section" id="examples">

View file

@ -128,7 +128,7 @@
<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="k">auto</span> <span class="n">input</span> <span class="o">=</span> <span class="n">array</span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">&gt;</span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">}};</span>
<span class="n">static_assert</span><span class="p">(</span><span class="o">*</span><span class="p">(</span><span class="n">input</span><span class="p">.</span><span class="n">end</span><span class="p">()</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="s">&quot;input last element is 10.&quot;</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="o">*</span><span class="p">(</span><span class="n">input</span><span class="p">.</span><span class="n">end</span><span class="p">()</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;input last element is 10.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>

View file

@ -137,7 +137,7 @@
<span class="k">auto</span> <span class="n">x</span> <span class="o">=</span> <span class="n">array</span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">&gt;</span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">}};</span>
<span class="n">x</span><span class="p">.</span><span class="n">fill</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<span class="n">SPROUT_ASSERT_MSG</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;filled with 0.&quot;</span><span class="p">);</span>
<span class="n">SPROUT_ASSERT_MSG</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;filled with 0.&quot;</span><span class="p">);</span>
</pre></div>
</div>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/array.hpp&gt;</span>
@ -145,7 +145,7 @@
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="k">auto</span> <span class="n">x</span> <span class="o">=</span> <span class="n">array</span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">&gt;</span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</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">x</span><span class="p">.</span><span class="n">fill</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;filled with 0.&quot;</span><span class="p">);</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">0</span><span class="p">,</span> <span class="s">&quot;filled with 0.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>

View file

@ -123,11 +123,9 @@
<div class="line-block">
<div class="line"><tt class="docutils literal"><span class="pre">std::copy(rhs.begin(),</span> <span class="pre">rhs.end(),</span> <span class="pre">begin())</span></tt>.</div>
<div class="line">or</div>
<div class="line-block">
<div class="line"><tt class="docutils literal"><span class="pre">std::move(rhs.begin(),</span> <span class="pre">rhs.end(),</span> <span class="pre">begin())</span></tt>.</div>
</div>
</div>
</div>
<div class="section" id="returns">
<h2>Returns<a class="headerlink" href="#returns" title="Permalink to this headline"></a></h2>
<div class="line-block">

View file

@ -39,7 +39,7 @@
<link rel="top" title="Sprout 1.0 documentation" href="../../../index.html" />
<link rel="up" title="Sprout.Array" href="../index.html" />
<link rel="next" title="operator==" href="operator-equal_to.html" />
<link rel="prev" title="back" href="c_array.html" />
<link rel="prev" title="c_array" href="c_array.html" />
</head>
<body>
<div class="related">
@ -52,7 +52,7 @@
<a href="operator-equal_to.html" title="operator=="
accesskey="N">next</a> |</li>
<li class="right" >
<a href="c_array.html" title="back"
<a href="c_array.html" title="c_array"
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>
@ -76,7 +76,7 @@
<h4>Previous topic</h4>
<p class="topless"><a href="c_array.html"
title="previous chapter">back</a></p>
title="previous chapter">c_array</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="operator-equal_to.html"
title="next chapter">operator==</a></p>
@ -173,7 +173,7 @@
<a href="operator-equal_to.html" title="operator=="
>next</a> |</li>
<li class="right" >
<a href="c_array.html" title="back"
<a href="c_array.html" title="c_array"
>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

@ -136,7 +136,7 @@
<span class="k">auto</span> <span class="n">x</span> <span class="o">=</span> <span class="n">array</span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">&gt;</span><span class="p">{{</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">10</span><span class="p">}};</span>
<span class="k">auto</span> <span class="n">y</span> <span class="o">=</span> <span class="n">array</span><span class="o">&lt;</span><span class="kt">int</span><span class="p">,</span> <span class="mi">10</span><span class="o">&gt;</span><span class="p">{{</span><span class="mi">10</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">}};</span>
<span class="n">x</span><span class="p">.</span><span class="n">swap</span><span class="p">(</span><span class="n">y</span><span class="p">);</span>
<span class="n">SPROUT_ASSERT_MSG</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10</span> <span class="o">&amp;&amp;</span> <span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="s">&quot;each element are swapped.&quot;</span><span class="p">);</span>
<span class="n">SPROUT_ASSERT_MSG</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">10</span> <span class="o">&amp;&amp;</span> <span class="n">y</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="s">&quot;each element are swapped.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</div>

File diff suppressed because one or more lines are too long