add doc: array members

This commit is contained in:
Bolero-MURAKAMI 2013-08-25 23:14:03 +09:00
parent 227a35c29c
commit 3a5283e165
91 changed files with 6507 additions and 572 deletions

View file

@ -10,17 +10,17 @@ Interface
template<typename ForwardIterator1, typename ForwardIterator2>
inline SPROUT_CONSTEXPR ForwardIterator1
find_end(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
inline SPROUT_CONSTEXPR ForwardIterator1
find_end(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
Effects
========================================

View file

@ -10,17 +10,17 @@ Interface
template<typename InputIterator1, typename ForwardIterator2>
inline SPROUT_CONSTEXPR InputIterator1
find_first_of(
InputIterator1 first1, InputIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
InputIterator1 first1, InputIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
template<typename InputIterator1, typename ForwardIterator2, typename BinaryPredicate>
inline SPROUT_CONSTEXPR InputIterator1
find_first_of(
InputIterator1 first1, InputIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
InputIterator1 first1, InputIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
Effects
========================================

View file

@ -54,78 +54,106 @@ Sprout.Algorithm
Non-modifying sequence operations
*******************************************************************************
* :doc:`all_of <./all_of>`
* :doc:`all_of_equal <./all_of_equal>`
* :doc:`any_of <./any_of>`
* :doc:`any_of_equal <./any_of_equal>`
* :doc:`none_of <./none_of>`
* :doc:`none_of_equal <./none_of_equal>`
* :doc:`one_of <./one_of>`
* :doc:`one_of_equal <./one_of_equal>`
* :doc:`find <./find>`
* :doc:`find_if <./find_if>`
* :doc:`find_if_not <./find_if_not>`
* :doc:`find_end <./find_end>`
* :doc:`find_first_of <./find_first_of>`
* :doc:`adjacent_find <./adjacent_find>`
* :doc:`count <./count>`
* :doc:`count_if <./count_if>`
* :doc:`mismatch <./mismatch>`
* :doc:`equal <./equal>`
* :doc:`is_permutation <./is_permutation>`
* :doc:`search <./search>`
* :doc:`search_n <./search_n>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`all_of <./all_of>`
:doc:`all_of_equal <./all_of_equal>`
:doc:`any_of <./any_of>`
:doc:`any_of_equal <./any_of_equal>`
:doc:`none_of <./none_of>`
:doc:`none_of_equal <./none_of_equal>`
:doc:`one_of <./one_of>`
:doc:`one_of_equal <./one_of_equal>`
:doc:`find <./find>`
:doc:`find_if <./find_if>`
:doc:`find_if_not <./find_if_not>`
:doc:`find_end <./find_end>`
:doc:`find_first_of <./find_first_of>`
:doc:`adjacent_find <./adjacent_find>`
:doc:`count <./count>`
:doc:`count_if <./count_if>`
:doc:`mismatch <./mismatch>`
:doc:`equal <./equal>`
:doc:`is_permutation <./is_permutation>`
:doc:`search <./search>`
:doc:`search_n <./search_n>`
======================================== ===============================================================================
.. _sprout-algorithm-non_modifying-sorting:
Sorting
========================================
* :doc:`is_sorted <./is_sorted>`
* :doc:`is_sorted_until <./is_sorted_until>`
* :doc:`is_increasing <./is_increasing>`
* :doc:`is_decreasing <./is_decreasing>`
* :doc:`is_strictly_increasing <./is_strictly_increasing>`
* :doc:`is_strictly_decreasing <./is_strictly_decreasing>`
================================================================================ ===============================================================================
function
================================================================================ ===============================================================================
:doc:`is_sorted <./is_sorted>`
:doc:`is_sorted_until <./is_sorted_until>`
:doc:`is_increasing <./is_increasing>`
:doc:`is_decreasing <./is_decreasing>`
:doc:`is_strictly_increasing <./is_strictly_increasing>`
:doc:`is_strictly_decreasing <./is_strictly_decreasing>`
================================================================================ ===============================================================================
.. _sprout-algorithm-non_modifying-binary:
Binary search
========================================
* :doc:`lower_bound <./lower_bound>`
* :doc:`upper_bound <./upper_bound>`
* :doc:`equal_range <./equal_range>`
* :doc:`binary_search <./binary_search>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`lower_bound <./lower_bound>`
:doc:`upper_bound <./upper_bound>`
:doc:`equal_range <./equal_range>`
:doc:`binary_search <./binary_search>`
======================================== ===============================================================================
.. _sprout-algorithm-non_modifying-heap:
Heap operations
========================================
* :doc:`is_heap <./is_heap>`
* :doc:`is_heap_until <./is_heap_until>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`is_heap <./is_heap>`
:doc:`is_heap_until <./is_heap_until>`
======================================== ===============================================================================
.. _sprout-algorithm-non_modifying-minmax:
Minimum and maximum
========================================
* :doc:`min <./min>`
* :doc:`max <./max>`
* :doc:`minmax <./minmax>`
* :doc:`min_element <./min_element>`
* :doc:`max_element <./max_element>`
* :doc:`minmax_element <./minmax_element>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`min <./min>`
:doc:`max <./max>`
:doc:`minmax <./minmax>`
:doc:`min_element <./min_element>`
:doc:`max_element <./max_element>`
:doc:`minmax_element <./minmax_element>`
======================================== ===============================================================================
.. _sprout-algorithm-non_modifying-lexicographical:
Lexicographical comparison
========================================
* :doc:`lexicographical_compare <./lexicographical_compare>`
* :doc:`tristate_lexicographical_compare <./tristate_lexicographical_compare>`
================================================================================ ===============================================================================
function
================================================================================ ===============================================================================
:doc:`lexicographical_compare <./lexicographical_compare>`
:doc:`tristate_lexicographical_compare <./tristate_lexicographical_compare>`
================================================================================ ===============================================================================
.. _sprout-algorithm-non_modifying-clamp:
Clamp algorithm
========================================
* :doc:`clamp <./clamp>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`clamp <./clamp>`
======================================== ===============================================================================
Header
========================================

View file

@ -10,17 +10,17 @@ Interface
template<typename InputIterator1, typename InputIterator2>
inline SPROUT_CONSTEXPR bool
lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
);
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
);
template<typename InputIterator1, typename InputIterator2, typename Compare>
inline SPROUT_CONSTEXPR bool
lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
);
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
);
Returns
========================================
@ -37,8 +37,8 @@ Remarks
.. sourcecode:: c++
for (; first1 != last1 && first2 != last2; ++first1, ++first2) {
if (*first1 < *first2) return true;
if (*first2 < *first1) return false;
if (*first1 < *first2) return true;
if (*first2 < *first1) return false;
}
return first1 == last1 && first2 != last2;

View file

@ -10,17 +10,17 @@ Interface
template<typename ForwardIterator1, typename ForwardIterator2>
inline SPROUT_CONSTEXPR ForwardIterator1
search(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
inline SPROUT_CONSTEXPR ForwardIterator1
search(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
Effects
========================================

View file

@ -10,17 +10,17 @@ Interface
template<typename InputIterator1, typename InputIterator2>
inline SPROUT_CONSTEXPR int
tristate_lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
);
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
);
template<typename InputIterator1, typename InputIterator2, typename Compare>
inline SPROUT_CONSTEXPR int
tristate_lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
);
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
);
Returns
========================================

View file

@ -0,0 +1,55 @@
.. _sprout-array-array-assign:
###############################################################################
assign
###############################################################################
Interface
========================================
.. sourcecode:: c++
void assign(const_reference value);
SPROUT_CONSTEXPR array assign(const_reference value) const;
Effects
========================================
| ``std::fill_n(begin(), N, value)``, or without effects in the case of const version.
Returns
========================================
| void, or array filled with value in the case of const version.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
#include <sprout/assert.hpp>
using namespace sprout;
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.");
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
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.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,44 @@
.. _sprout-array-array-at:
###############################################################################
at
###############################################################################
Interface
========================================
.. sourcecode:: c++
reference at(size_type n);
SPROUT_CONSTEXPR const_reference at(size_type n) const;
Returns
========================================
| The element at the specified position in the array.
Throws
========================================
| It throws std::out_of_range if n is out of bounds.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.at(5) == 6, "an element at position 5 is 6.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-back:
###############################################################################
back
###############################################################################
Interface
========================================
.. sourcecode:: c++
reference back();
SPROUT_CONSTEXPR const_reference back() const;
Returns
========================================
| A reference to the last element in the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.back() == 10, "a last element is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-begin:
###############################################################################
begin
###############################################################################
Interface
========================================
.. sourcecode:: c++
iterator begin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT;
Returns
========================================
| iterator for the first element.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*input.begin() == 1, "input first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-c_array:
###############################################################################
back
###############################################################################
Interface
========================================
.. sourcecode:: c++
pointer c_array() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT;
Returns
========================================
| Pointer to the data contained by the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.c_array()[0] == 1, "a first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-cbegin:
###############################################################################
cbegin
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
Returns
========================================
| iterator for the first element always const.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
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, "input first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-cbegin:
###############################################################################
cbegin
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
Returns
========================================
| iterator for position after the last element always const.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
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) == 1, "input last element is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-crbegin:
###############################################################################
crbegin
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT;
Returns
========================================
| reverse iterator for the first element of reverse iteration always const.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*input.crbegin() == 10, "input first element of reverse iteration is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-crend:
###############################################################################
crend
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT;
Returns
========================================
| reverse iterator for position after the last element in reverse iteration always const.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*(input.crend() - 1) == 1, "input last element of reverse iteration is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-data:
###############################################################################
back
###############################################################################
Interface
========================================
.. sourcecode:: c++
pointer data() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT;
Returns
========================================
| Pointer to the data contained by the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.data()[0] == 1, "a first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-empty:
###############################################################################
empty
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT;
Returns
========================================
| true if the array size is 0, false otherwise.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 0>{{}};
static_assert(input.empty() == 10, "input is empty.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-end:
###############################################################################
end
###############################################################################
Interface
========================================
.. sourcecode:: c++
iterator end() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT;
Returns
========================================
| iterator for position after the last element.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
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.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,55 @@
.. _sprout-array-array-fill:
###############################################################################
fill
###############################################################################
Interface
========================================
.. sourcecode:: c++
void fill(const_reference value);
SPROUT_CONSTEXPR array fill(const_reference value) const;
Effects
========================================
| ``std::fill_n(begin(), N, value)``, or without effects in the case of const version.
Returns
========================================
| void, or array filled with value in the case of const version.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
#include <sprout/assert.hpp>
using namespace sprout;
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.");
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
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.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-front:
###############################################################################
front
###############################################################################
Interface
========================================
.. sourcecode:: c++
reference front();
SPROUT_CONSTEXPR const_reference front() const;
Returns
========================================
| A reference to the first element in the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.front() == 1, "a first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -6,128 +6,189 @@ Class template array
.. toctree::
:hidden:
initializer-
operator-assign
fill
assign
swap
begin
end
rbegin
rend
cbegin
cend
crbegin
crend
size
max_size
empty
at
operator-subscript
front
back
data
c_array
Interface
========================================
.. sourcecode:: c++
template <typename T, std::size_t N>
class array {
// types:
typedef T& reference;
typedef T const& const_reference;
typedef /*implementation-defined*/ iterator;
typedef /*implementation-defined*/ const_iterator;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef T value_type;
typedef T* pointer;
typedef T const* const_pointer;
typedef sprout::reverse_iterator<iterator> reverse_iterator;
typedef sprout::reverse_iterator<const_iterator> const_reverse_iterator;
// types:
typedef T& reference;
typedef T const& const_reference;
typedef /*implementation-defined*/ iterator;
typedef /*implementation-defined*/ const_iterator;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef T value_type;
typedef T* pointer;
typedef T const* const_pointer;
typedef sprout::reverse_iterator<iterator> reverse_iterator;
typedef sprout::reverse_iterator<const_iterator> const_reverse_iterator;
// constants:
SPROUT_STATIC_CONSTEXPR size_type static_size = N;
// constants:
SPROUT_STATIC_CONSTEXPR size_type static_size = N;
T elems[N ? N : 1]; // exposition only
T elems[N ? N : 1]; // exposition only
// construct/copy/destroy:
template<typename T2>
array& operator=(array<T2, N> const& rhs);
template<typename T2>
array& operator=(array<T2, N>&& rhs);
// construct/copy/destroy:
template<typename T2>
array& operator=(array<T2, N> const& rhs);
template<typename T2>
array& operator=(array<T2, N>&& rhs);
// modifiers:
void fill(const_reference u);
SPROUT_CONSTEXPR array fill(const_reference value) const;
void assign(const_reference value);
SPROUT_CONSTEXPR array assign(const_reference value) const;
void swap(array&) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval<T&>(), std::declval<T&>())));
// modifiers:
void fill(const_reference value);
SPROUT_CONSTEXPR array fill(const_reference value) const;
void assign(const_reference value);
SPROUT_CONSTEXPR array assign(const_reference value) const;
void swap(array&) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval<T&>(), std::declval<T&>())));
// iterators:
iterator begin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT;
iterator end() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT;
reverse_iterator rbegin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT;
reverse_iterator rend() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT;
// iterators:
iterator begin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT;
iterator end() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT;
reverse_iterator rbegin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT;
reverse_iterator rend() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT;
// capacity:
SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT;
// capacity:
SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT;
// element access:
reference operator[](size_type n);
SPROUT_CONSTEXPR const_reference operator[](size_type n) const;
reference at(size_type n);
SPROUT_CONSTEXPR const_reference at(size_type n) const;
reference front();
SPROUT_CONSTEXPR const_reference front() const;
reference back();
SPROUT_CONSTEXPR const_reference back() const;
pointer data() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT;
pointer c_array() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT;
// element access:
reference operator[](size_type n);
SPROUT_CONSTEXPR const_reference operator[](size_type n) const;
reference at(size_type n);
SPROUT_CONSTEXPR const_reference at(size_type n) const;
reference front();
SPROUT_CONSTEXPR const_reference front() const;
reference back();
SPROUT_CONSTEXPR const_reference back() const;
pointer data() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT;
pointer c_array() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT;
};
Description
========================================
Member types
----------------------------------------
======================================== =============================================================================== =======================================
type definition note
======================================== =============================================================================== =======================================
reference T&
const_reference T const&
iterator *implementation-defined*, convertible to const_iterator,
**ConstexprRandomAccessIterator** convertible to pointer
const_iterator *implementation-defined*, convertible to const_pointer
**ConstexprRandomAccessIterator**
size_type std::size_t
difference_type std::ptrdiff_t
value_type T
pointer T*
const_pointer T const*
reverse_iterator sprout::reverse_iterator<iterator>,
**ConstexprRandomAccessIterator**
const_reverse_iterator sprout::reverse_iterator<const_iterator>,
**ConstexprRandomAccessIterator**
======================================== =============================================================================== =======================================
Member functions
----------------------------------------
(initializer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`(initializer) <./array/initializer->`
construct/copy/destroy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`operator= <./array/operator-assign>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`(initializer) <./initializer->`
======================================== ===============================================================================
modifiers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`fill <./array/fill>`
* :doc:`assign <./array/assign>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`fill <./fill>`
:doc:`assign <./assign>`
:doc:`swap <./swap>`
======================================== ===============================================================================
iterators
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`begin <./array/begin>`
* :doc:`end <./array/end>`
* :doc:`rbegin <./array/rbegin>`
* :doc:`rend <./array/rend>`
* :doc:`cbegin <./array/cbegin>`
* :doc:`cend <./array/cend>`
* :doc:`crbegin <./array/crbegin>`
* :doc:`crend <./array/crend>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`begin <./begin>`
:doc:`end <./end>`
:doc:`rbegin <./rbegin>`
:doc:`rend <./rend>`
:doc:`cbegin <./cbegin>`
:doc:`cend <./cend>`
:doc:`crbegin <./crbegin>`
:doc:`crend <./crend>`
======================================== ===============================================================================
capacity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`size <./array/size>`
* :doc:`max_size <./array/max_size>`
* :doc:`empty <./array/empty>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`size <./size>`
:doc:`max_size <./max_size>`
:doc:`empty <./empty>`
======================================== ===============================================================================
element access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`operator[] <./array/operator-subscript>`
* :doc:`at <./array/at>`
* :doc:`front <./array/front>`
* :doc:`back <./array/back>`
* :doc:`data <./array/data>`
* :doc:`c_array <./array/c_array>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`operator[] <./operator-subscript>`
:doc:`at <./at>`
:doc:`front <./front>`
:doc:`back <./back>`
:doc:`data <./data>`
:doc:`c_array <./c_array>`
======================================== ===============================================================================
Header
========================================

View file

@ -0,0 +1,36 @@
.. _sprout-array-array-initializer-:
###############################################################################
(initializer)
###############################################################################
Remarks
========================================
| An array is an aggregate that can be initialized with the syntax
.. sourcecode:: c++
array<T, N> a = { initializer-list };
| where initializer-list is a comma-separated list of up to N elements whose types are convertible to T.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-max_size:
###############################################################################
max_size
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT;
Returns
========================================
| The number of elements contained in the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.max_size() == 10, "input max size is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,41 @@
.. _sprout-array-array-operator-assign:
###############################################################################
operator=
###############################################################################
Interface
========================================
.. sourcecode:: c++
template<typename T2>
array& operator=(array<T2, N> const& rhs);
template<typename T2>
array& operator=(array<T2, N>&& rhs);
Effects
========================================
| ``std::copy(rhs.begin(), rhs.end(), begin())``, ``std::move(rhs.begin(), rhs.end(), begin())``.
Returns
========================================
| ``*this``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
auto x = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
x = array<int, 10>{{10, 9, 8, 7, 6, 5, 4, 3, 2, 1}};
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,44 @@
.. _sprout-array-array-operator-subscript:
###############################################################################
operator[]
###############################################################################
Interface
========================================
.. sourcecode:: c++
reference operator[](size_type n);
SPROUT_CONSTEXPR const_reference operator[](size_type n) const;
Returns
========================================
| The element at the specified position in the array.
Remarks
========================================
| It causes undefined behavior if n is out of bounds.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input[5] == 6, "an element at position 5 is 6.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-rbegin:
###############################################################################
rbegin
###############################################################################
Interface
========================================
.. sourcecode:: c++
reverse_iterator rbegin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT;
Returns
========================================
| reverse iterator for the first element of reverse iteration.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*input.rbegin() == 10, "input first element of reverse iteration is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-rend:
###############################################################################
rend
###############################################################################
Interface
========================================
.. sourcecode:: c++
reverse_iterator rend() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT;
Returns
========================================
| reverse iterator for position after the last element in reverse iteration.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*(input.rend() - 1) == 1, "input last element of reverse iteration is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-size:
###############################################################################
size
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT;
Returns
========================================
| The number of elements contained in the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.size() == 10, "input size is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,46 @@
.. _sprout-array-array-swap:
###############################################################################
swap
###############################################################################
Interface
========================================
.. sourcecode:: c++
void swap(array& y) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval<T&>(), std::declval<T&>())));
Returns
========================================
| ``swap_ranges(begin(), end(), y.begin())``.
Throws
========================================
| Nothing unless one of the element-wise swap calls throws an exception.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
#include <sprout/assert.hpp>
using namespace sprout;
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.");
Complexity
========================================
| Linear.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -8,29 +8,24 @@ Sprout.Array
array/index
Interface
========================================
.. sourcecode:: c++
template <typename T, std::size_t N>
class array;
template<typename T, std::size_t N>
inline void swap(sprout::array<T, N>& lhs, sprout::array<T, N>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)));
template<typename T, std::size_t N>
inline SPROUT_CONSTEXPR sprout::array<T, N> to_array(T const (& arr)[N]);
Classes
========================================
* :doc:`array <./array/index>`
======================================== ===============================================================================
class
======================================== ===============================================================================
:doc:`array <./array/index>`
======================================== ===============================================================================
Non-member functions
========================================
* :doc:`swap <./swap>`
* :doc:`to_array <./to_array>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`swap <./swap>`
:doc:`to_array <./to_array>`
======================================== ===============================================================================
Header
========================================

View file

@ -56,17 +56,17 @@
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">ForwardIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">ForwardIterator2</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">ForwardIterator1</span>
<span class="n">find_end</span><span class="p">(</span>
<span class="n">ForwardIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">ForwardIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="n">ForwardIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">ForwardIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">ForwardIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">ForwardIterator2</span><span class="p">,</span> <span class="k">typename</span> <span class="n">BinaryPredicate</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">ForwardIterator1</span>
<span class="n">find_end</span><span class="p">(</span>
<span class="n">ForwardIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">ForwardIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">BinaryPredicate</span> <span class="n">pred</span>
<span class="p">);</span>
<span class="n">ForwardIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">ForwardIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">BinaryPredicate</span> <span class="n">pred</span>
<span class="p">);</span>
</pre></div>
</div>
</div>

View file

@ -56,17 +56,17 @@
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">InputIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">ForwardIterator2</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">InputIterator1</span>
<span class="n">find_first_of</span><span class="p">(</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">InputIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">ForwardIterator2</span><span class="p">,</span> <span class="k">typename</span> <span class="n">BinaryPredicate</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">InputIterator1</span>
<span class="n">find_first_of</span><span class="p">(</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">BinaryPredicate</span> <span class="n">pred</span>
<span class="p">);</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">BinaryPredicate</span> <span class="n">pred</span>
<span class="p">);</span>
</pre></div>
</div>
</div>

View file

@ -22,7 +22,7 @@
<link rel="top" title="Sprout v1.0 documentation" href="../../../index.html" />
<link rel="up" title="Libraries" href="../../libraries.html" />
<link rel="next" title="all_of" href="all_of.html" />
<link rel="prev" title="Class template array" href="../array/array/index.html" />
<link rel="prev" title="back" href="../array/array/c_array.html" />
</head>
<body>
<div class="related">
@ -35,7 +35,7 @@
<a href="all_of.html" title="all_of"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../array/array/index.html" title="Class template array"
<a href="../array/array/c_array.html" title="back"
accesskey="P">previous</a> |</li>
<li><a href="../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
@ -52,79 +52,240 @@
<h1>Sprout.Algorithm<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h1>
<div class="section" id="non-modifying-sequence-operations">
<h2>Non-modifying sequence operations<a class="headerlink" href="#non-modifying-sequence-operations" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference external" href="all_of.html"><em>all_of</em></a></li>
<li><a class="reference external" href="all_of_equal.html"><em>all_of_equal</em></a></li>
<li><a class="reference external" href="any_of.html"><em>any_of</em></a></li>
<li><a class="reference external" href="any_of_equal.html"><em>any_of_equal</em></a></li>
<li><a class="reference external" href="none_of.html"><em>none_of</em></a></li>
<li><a class="reference external" href="none_of_equal.html"><em>none_of_equal</em></a></li>
<li><a class="reference external" href="one_of.html"><em>one_of</em></a></li>
<li><a class="reference external" href="one_of_equal.html"><em>one_of_equal</em></a></li>
<li><a class="reference external" href="find.html"><em>find</em></a></li>
<li><a class="reference external" href="find_if.html"><em>find_if</em></a></li>
<li><a class="reference external" href="find_if_not.html"><em>find_if_not</em></a></li>
<li><a class="reference external" href="find_end.html"><em>find_end</em></a></li>
<li><a class="reference external" href="find_first_of.html"><em>find_first_of</em></a></li>
<li><a class="reference external" href="adjacent_find.html"><em>adjacent_find</em></a></li>
<li><a class="reference external" href="count.html"><em>count</em></a></li>
<li><a class="reference external" href="count_if.html"><em>count_if</em></a></li>
<li><a class="reference external" href="mismatch.html"><em>mismatch</em></a></li>
<li><a class="reference external" href="equal.html"><em>equal</em></a></li>
<li><a class="reference external" href="is_permutation.html"><em>is_permutation</em></a></li>
<li><a class="reference external" href="search.html"><em>search</em></a></li>
<li><a class="reference external" href="search_n.html"><em>search_n</em></a></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="all_of.html"><em>all_of</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="all_of_equal.html"><em>all_of_equal</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="any_of.html"><em>any_of</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="any_of_equal.html"><em>any_of_equal</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="none_of.html"><em>none_of</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="none_of_equal.html"><em>none_of_equal</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="one_of.html"><em>one_of</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="one_of_equal.html"><em>one_of_equal</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="find.html"><em>find</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="find_if.html"><em>find_if</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="find_if_not.html"><em>find_if_not</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="find_end.html"><em>find_end</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="find_first_of.html"><em>find_first_of</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="adjacent_find.html"><em>adjacent_find</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="count.html"><em>count</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="count_if.html"><em>count_if</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="mismatch.html"><em>mismatch</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="equal.html"><em>equal</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="is_permutation.html"><em>is_permutation</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="search.html"><em>search</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="search_n.html"><em>search_n</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<div class="section" id="sorting">
<h3>Sorting<a class="headerlink" href="#sorting" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><a class="reference external" href="is_sorted.html"><em>is_sorted</em></a></li>
<li><a class="reference external" href="is_sorted_until.html"><em>is_sorted_until</em></a></li>
<li><a class="reference external" href="is_increasing.html"><em>is_increasing</em></a></li>
<li><a class="reference external" href="is_decreasing.html"><em>is_decreasing</em></a></li>
<li><a class="reference external" href="is_strictly_increasing.html"><em>is_strictly_increasing</em></a></li>
<li><a class="reference external" href="is_strictly_decreasing.html"><em>is_strictly_decreasing</em></a></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="is_sorted.html"><em>is_sorted</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="is_sorted_until.html"><em>is_sorted_until</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="is_increasing.html"><em>is_increasing</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="is_decreasing.html"><em>is_decreasing</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="is_strictly_increasing.html"><em>is_strictly_increasing</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="is_strictly_decreasing.html"><em>is_strictly_decreasing</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="binary-search">
<h3>Binary search<a class="headerlink" href="#binary-search" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><a class="reference external" href="lower_bound.html"><em>lower_bound</em></a></li>
<li><a class="reference external" href="upper_bound.html"><em>upper_bound</em></a></li>
<li><a class="reference external" href="equal_range.html"><em>equal_range</em></a></li>
<li><a class="reference external" href="binary_search.html"><em>binary_search</em></a></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="lower_bound.html"><em>lower_bound</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="upper_bound.html"><em>upper_bound</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="equal_range.html"><em>equal_range</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="binary_search.html"><em>binary_search</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="heap-operations">
<h3>Heap operations<a class="headerlink" href="#heap-operations" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><a class="reference external" href="is_heap.html"><em>is_heap</em></a></li>
<li><a class="reference external" href="is_heap_until.html"><em>is_heap_until</em></a></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="is_heap.html"><em>is_heap</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="is_heap_until.html"><em>is_heap_until</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="minimum-and-maximum">
<h3>Minimum and maximum<a class="headerlink" href="#minimum-and-maximum" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><a class="reference external" href="min.html"><em>min</em></a></li>
<li><a class="reference external" href="max.html"><em>max</em></a></li>
<li><a class="reference external" href="minmax.html"><em>minmax</em></a></li>
<li><a class="reference external" href="min_element.html"><em>min_element</em></a></li>
<li><a class="reference external" href="max_element.html"><em>max_element</em></a></li>
<li><a class="reference external" href="minmax_element.html"><em>minmax_element</em></a></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="min.html"><em>min</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="max.html"><em>max</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="minmax.html"><em>minmax</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="min_element.html"><em>min_element</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="max_element.html"><em>max_element</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="minmax_element.html"><em>minmax_element</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="lexicographical-comparison">
<h3>Lexicographical comparison<a class="headerlink" href="#lexicographical-comparison" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><a class="reference external" href="lexicographical_compare.html"><em>lexicographical_compare</em></a></li>
<li><a class="reference external" href="tristate_lexicographical_compare.html"><em>tristate_lexicographical_compare</em></a></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="lexicographical_compare.html"><em>lexicographical_compare</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="tristate_lexicographical_compare.html"><em>tristate_lexicographical_compare</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="clamp-algorithm">
<h3>Clamp algorithm<a class="headerlink" href="#clamp-algorithm" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><a class="reference external" href="clamp.html"><em>clamp</em></a></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="clamp.html"><em>clamp</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="header">
<h3>Header<a class="headerlink" href="#header" title="Permalink to this headline"></a></h3>
@ -157,8 +318,8 @@
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../array/array/index.html"
title="previous chapter">Class template array</a></p>
<p class="topless"><a href="../array/array/c_array.html"
title="previous chapter">back</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="all_of.html"
title="next chapter">all_of</a></p>
@ -194,7 +355,7 @@
<a href="all_of.html" title="all_of"
>next</a> |</li>
<li class="right" >
<a href="../array/array/index.html" title="Class template array"
<a href="../array/array/c_array.html" title="back"
>previous</a> |</li>
<li><a href="../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../index.html" >Sprout C++ Libraries</a> &raquo;</li>

View file

@ -56,17 +56,17 @@
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">InputIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">InputIterator2</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span>
<span class="n">lexicographical_compare</span><span class="p">(</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">InputIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">InputIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">InputIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">InputIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">InputIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">InputIterator2</span><span class="p">,</span> <span class="k">typename</span> <span class="n">Compare</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span>
<span class="n">lexicographical_compare</span><span class="p">(</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">InputIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">InputIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">Compare</span> <span class="n">comp</span>
<span class="p">);</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">InputIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">InputIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">Compare</span> <span class="n">comp</span>
<span class="p">);</span>
</pre></div>
</div>
</div>
@ -84,8 +84,8 @@
<div class="line">Otherwise, the lexicographical comparison of the sequences yields the same result as the comparison of the first corresponding pair of elements that are not equivalent.</div>
</div>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">for</span> <span class="p">(;</span> <span class="n">first1</span> <span class="o">!=</span> <span class="n">last1</span> <span class="o">&amp;&amp;</span> <span class="n">first2</span> <span class="o">!=</span> <span class="n">last2</span><span class="p">;</span> <span class="o">++</span><span class="n">first1</span><span class="p">,</span> <span class="o">++</span><span class="n">first2</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">first1</span> <span class="o">&lt;</span> <span class="o">*</span><span class="n">first2</span><span class="p">)</span> <span class="k">return</span> <span class="kc">true</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">first2</span> <span class="o">&lt;</span> <span class="o">*</span><span class="n">first1</span><span class="p">)</span> <span class="k">return</span> <span class="kc">false</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">first1</span> <span class="o">&lt;</span> <span class="o">*</span><span class="n">first2</span><span class="p">)</span> <span class="k">return</span> <span class="kc">true</span><span class="p">;</span>
<span class="k">if</span> <span class="p">(</span><span class="o">*</span><span class="n">first2</span> <span class="o">&lt;</span> <span class="o">*</span><span class="n">first1</span><span class="p">)</span> <span class="k">return</span> <span class="kc">false</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">return</span> <span class="n">first1</span> <span class="o">==</span> <span class="n">last1</span> <span class="o">&amp;&amp;</span> <span class="n">first2</span> <span class="o">!=</span> <span class="n">last2</span><span class="p">;</span>
</pre></div>

View file

@ -56,17 +56,17 @@
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">ForwardIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">ForwardIterator2</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">ForwardIterator1</span>
<span class="n">search</span><span class="p">(</span>
<span class="n">ForwardIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">ForwardIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="n">ForwardIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">ForwardIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">ForwardIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">ForwardIterator2</span><span class="p">,</span> <span class="k">typename</span> <span class="n">BinaryPredicate</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">ForwardIterator1</span>
<span class="n">search</span><span class="p">(</span>
<span class="n">ForwardIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">ForwardIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">BinaryPredicate</span> <span class="n">pred</span>
<span class="p">);</span>
<span class="n">ForwardIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">ForwardIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">ForwardIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">ForwardIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">BinaryPredicate</span> <span class="n">pred</span>
<span class="p">);</span>
</pre></div>
</div>
</div>

View file

@ -56,17 +56,17 @@
<div class="highlight-c++"><div class="highlight"><pre><span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">InputIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">InputIterator2</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">int</span>
<span class="n">tristate_lexicographical_compare</span><span class="p">(</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">InputIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">InputIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">InputIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">InputIterator2</span> <span class="n">last2</span>
<span class="p">);</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">InputIterator1</span><span class="p">,</span> <span class="k">typename</span> <span class="n">InputIterator2</span><span class="p">,</span> <span class="k">typename</span> <span class="n">Compare</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="kt">int</span>
<span class="n">tristate_lexicographical_compare</span><span class="p">(</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">InputIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">InputIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">Compare</span> <span class="n">comp</span>
<span class="p">);</span>
<span class="n">InputIterator1</span> <span class="n">first1</span><span class="p">,</span> <span class="n">InputIterator1</span> <span class="n">last1</span><span class="p">,</span>
<span class="n">InputIterator2</span> <span class="n">first2</span><span class="p">,</span> <span class="n">InputIterator2</span> <span class="n">last2</span><span class="p">,</span>
<span class="n">Compare</span> <span class="n">comp</span>
<span class="p">);</span>
</pre></div>
</div>
</div>

View file

@ -0,0 +1,181 @@
<!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" />
<title>assign &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="swap" href="swap.html" />
<link rel="prev" title="fill" href="fill.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="swap.html" title="swap"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="fill.html" title="fill"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="assign">
<h1>assign<a class="headerlink" href="#assign" 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="kt">void</span> <span class="n">assign</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">array</span> <span class="n">assign</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">)</span> <span class="k">const</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"><tt class="docutils literal"><span class="pre">std::fill_n(begin(),</span> <span class="pre">N,</span> <span class="pre">value)</span></tt>, or without effects in the case of const version.</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">
<div class="line">void, or array filled with value in the case of const version.</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/array.hpp&gt;</span>
<span class="cp">#include &lt;sprout/assert.hpp&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</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">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>
</pre></div>
</div>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/array.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="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>
</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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">assign</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#effects">Effects</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="fill.html"
title="previous chapter">fill</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="swap.html"
title="next chapter">swap</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/assign.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" size="18" />
<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="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="swap.html" title="swap"
>next</a> |</li>
<li class="right" >
<a href="fill.html" title="fill"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,171 @@
<!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" />
<title>at &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="operator[]" href="operator-subscript.html" />
<link rel="prev" title="empty" href="empty.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="operator-subscript.html" title="operator[]"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="empty.html" title="empty"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="at">
<h1>at<a class="headerlink" href="#at" 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">reference</span> <span class="n">at</span><span class="p">(</span><span class="n">size_type</span> <span class="n">n</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">at</span><span class="p">(</span><span class="n">size_type</span> <span class="n">n</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
</pre></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">
<div class="line">The element at the specified position in the array.</div>
</div>
</div>
<div class="section" id="throws">
<h2>Throws<a class="headerlink" href="#throws" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">It throws std::out_of_range if n is out of bounds.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">at</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span> <span class="o">==</span> <span class="mi">6</span><span class="p">,</span> <span class="s">&quot;an element at position 5 is 6.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">at</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#throws">Throws</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="empty.html"
title="previous chapter">empty</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="operator-subscript.html"
title="next chapter">operator[]</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/at.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" size="18" />
<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="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="operator-subscript.html" title="operator[]"
>next</a> |</li>
<li class="right" >
<a href="empty.html" title="empty"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!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" />
<title>back &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="back" href="data.html" />
<link rel="prev" title="front" href="front.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="data.html" title="back"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="front.html" title="front"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<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="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">reference</span> <span class="n">back</span><span class="p">();</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">back</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
</pre></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">
<div class="line">A reference to the last element in the array.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">back</span><span class="p">()</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;a last element is 10.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">back</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="front.html"
title="previous chapter">front</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="data.html"
title="next chapter">back</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/back.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" size="18" />
<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="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="data.html" title="back"
>next</a> |</li>
<li class="right" >
<a href="front.html" title="front"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!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" />
<title>begin &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="end" href="end.html" />
<link rel="prev" title="swap" href="swap.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="end.html" title="end"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="swap.html" title="swap"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="begin">
<h1>begin<a class="headerlink" href="#begin" 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">iterator</span> <span class="n">begin</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_iterator</span> <span class="n">begin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">iterator for the first element.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">begin</span><span class="p">()</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="s">&quot;input first element is 1.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">begin</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="swap.html"
title="previous chapter">swap</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="end.html"
title="next chapter">end</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/begin.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" size="18" />
<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="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="end.html" title="end"
>next</a> |</li>
<li class="right" >
<a href="swap.html" title="swap"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!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" />
<title>back &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="Sprout.Algorithm" href="../../algorithm/index.html" />
<link rel="prev" title="back" href="data.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="../../algorithm/index.html" title="Sprout.Algorithm"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="data.html" title="back"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<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="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>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_pointer</span> <span class="n">c_array</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">Pointer to the data contained by the array.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">c_array</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;a first element is 1.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">back</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="data.html"
title="previous chapter">back</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../../algorithm/index.html"
title="next chapter">Sprout.Algorithm</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/c_array.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" size="18" />
<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="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="../../algorithm/index.html" title="Sprout.Algorithm"
>next</a> |</li>
<li class="right" >
<a href="data.html" title="back"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,162 @@
<!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" />
<title>cbegin &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="cbegin" href="cend.html" />
<link rel="prev" title="rend" href="rend.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="cend.html" title="cbegin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="rend.html" title="rend"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<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="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>
</pre></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">
<div class="line">iterator for the first element always const.</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/array.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="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="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="s">&quot;input first element is 1.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">cbegin</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="rend.html"
title="previous chapter">rend</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="cend.html"
title="next chapter">cbegin</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/cbegin.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" size="18" />
<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="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="cend.html" title="cbegin"
>next</a> |</li>
<li class="right" >
<a href="rend.html" title="rend"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,162 @@
<!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" />
<title>cbegin &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="crbegin" href="crbegin.html" />
<link rel="prev" title="cbegin" href="cbegin.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="crbegin.html" title="crbegin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="cbegin.html" title="cbegin"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<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="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>
</pre></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">
<div class="line">iterator for position after the last element always const.</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/array.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="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">1</span><span class="p">,</span> <span class="s">&quot;input last element is 10.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">cbegin</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="cbegin.html"
title="previous chapter">cbegin</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="crbegin.html"
title="next chapter">crbegin</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/cend.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" size="18" />
<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="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="crbegin.html" title="crbegin"
>next</a> |</li>
<li class="right" >
<a href="cbegin.html" title="cbegin"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,162 @@
<!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" />
<title>crbegin &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="crend" href="crend.html" />
<link rel="prev" title="cbegin" href="cend.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="crend.html" title="crend"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="cend.html" title="cbegin"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="crbegin">
<h1>crbegin<a class="headerlink" href="#crbegin" 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_reverse_iterator</span> <span class="n">crbegin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">reverse iterator for the first element of reverse iteration always const.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">crbegin</span><span class="p">()</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;input first element of reverse iteration is 10.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">crbegin</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="cend.html"
title="previous chapter">cbegin</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="crend.html"
title="next chapter">crend</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/crbegin.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" size="18" />
<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="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="crend.html" title="crend"
>next</a> |</li>
<li class="right" >
<a href="cend.html" title="cbegin"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,162 @@
<!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" />
<title>crend &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="size" href="size.html" />
<link rel="prev" title="crbegin" href="crbegin.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="size.html" title="size"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="crbegin.html" title="crbegin"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="crend">
<h1>crend<a class="headerlink" href="#crend" 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_reverse_iterator</span> <span class="n">crend</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">reverse iterator for position after the last element in reverse iteration always const.</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/array.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="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">crend</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 of reverse iteration is 1.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">crend</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="crbegin.html"
title="previous chapter">crbegin</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="size.html"
title="next chapter">size</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/crend.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" size="18" />
<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="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="size.html" title="size"
>next</a> |</li>
<li class="right" >
<a href="crbegin.html" title="crbegin"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!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" />
<title>back &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="back" href="c_array.html" />
<link rel="prev" title="back" href="back.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="c_array.html" title="back"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="back.html" title="back"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<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="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>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_pointer</span> <span class="n">data</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">Pointer to the data contained by the array.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">data</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;a first element is 1.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">back</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="back.html"
title="previous chapter">back</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="c_array.html"
title="next chapter">back</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/data.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" size="18" />
<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="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="c_array.html" title="back"
>next</a> |</li>
<li class="right" >
<a href="back.html" title="back"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,162 @@
<!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" />
<title>empty &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="at" href="at.html" />
<link rel="prev" title="max_size" href="max_size.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="at.html" title="at"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="max_size.html" title="max_size"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="empty">
<h1>empty<a class="headerlink" href="#empty" 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="kt">bool</span> <span class="n">empty</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">true if the array size is 0, false otherwise.</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/array.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="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">0</span><span class="o">&gt;</span><span class="p">{{}};</span>
<span class="n">static_assert</span><span class="p">(</span><span class="n">input</span><span class="p">.</span><span class="n">empty</span><span class="p">()</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;input is empty.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">empty</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="max_size.html"
title="previous chapter">max_size</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="at.html"
title="next chapter">at</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/empty.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" size="18" />
<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="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="at.html" title="at"
>next</a> |</li>
<li class="right" >
<a href="max_size.html" title="max_size"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!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" />
<title>end &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="rbegin" href="rbegin.html" />
<link rel="prev" title="begin" href="begin.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="rbegin.html" title="rbegin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="begin.html" title="begin"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="end">
<h1>end<a class="headerlink" href="#end" 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">iterator</span> <span class="n">end</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_iterator</span> <span class="n">end</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">iterator for position after the last element.</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/array.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="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>
</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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">end</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="begin.html"
title="previous chapter">begin</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="rbegin.html"
title="next chapter">rbegin</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/end.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" size="18" />
<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="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="rbegin.html" title="rbegin"
>next</a> |</li>
<li class="right" >
<a href="begin.html" title="begin"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,181 @@
<!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" />
<title>fill &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="assign" href="assign.html" />
<link rel="prev" title="operator=" href="operator-assign.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="assign.html" title="assign"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="operator-assign.html" title="operator="
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="fill">
<h1>fill<a class="headerlink" href="#fill" 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="kt">void</span> <span class="n">fill</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">array</span> <span class="n">fill</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">)</span> <span class="k">const</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"><tt class="docutils literal"><span class="pre">std::fill_n(begin(),</span> <span class="pre">N,</span> <span class="pre">value)</span></tt>, or without effects in the case of const version.</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">
<div class="line">void, or array filled with value in the case of const version.</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/array.hpp&gt;</span>
<span class="cp">#include &lt;sprout/assert.hpp&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</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">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>
</pre></div>
</div>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include &lt;sprout/array.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="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>
</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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">fill</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#effects">Effects</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="operator-assign.html"
title="previous chapter">operator=</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="assign.html"
title="next chapter">assign</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/fill.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" size="18" />
<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="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="assign.html" title="assign"
>next</a> |</li>
<li class="right" >
<a href="operator-assign.html" title="operator="
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!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" />
<title>front &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="back" href="back.html" />
<link rel="prev" title="operator[]" href="operator-subscript.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="back.html" title="back"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="operator-subscript.html" title="operator[]"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="front">
<h1>front<a class="headerlink" href="#front" 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">reference</span> <span class="n">front</span><span class="p">();</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">front</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
</pre></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">
<div class="line">A reference to the first element in the array.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">front</span><span class="p">()</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="s">&quot;a first element is 1.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">front</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="operator-subscript.html"
title="previous chapter">operator[]</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="back.html"
title="next chapter">back</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/front.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" size="18" />
<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="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="back.html" title="back"
>next</a> |</li>
<li class="right" >
<a href="operator-subscript.html" title="operator[]"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -21,7 +21,7 @@
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Sprout.Array" href="../index.html" />
<link rel="next" title="Sprout.Algorithm" href="../../algorithm/index.html" />
<link rel="next" title="(initializer)" href="initializer-.html" />
<link rel="prev" title="Sprout.Array" href="../index.html" />
</head>
<body>
@ -32,7 +32,7 @@
<a href="../../../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../algorithm/index.html" title="Sprout.Algorithm"
<a href="initializer-.html" title="(initializer)"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../index.html" title="Sprout.Array"
@ -55,127 +55,286 @@
<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">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">size_t</span> <span class="n">N</span><span class="o">&gt;</span>
<span class="k">class</span> <span class="nc">array</span> <span class="p">{</span>
<span class="c1">// types:</span>
<span class="k">typedef</span> <span class="n">T</span><span class="o">&amp;</span> <span class="n">reference</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">T</span> <span class="k">const</span><span class="o">&amp;</span> <span class="n">const_reference</span><span class="p">;</span>
<span class="k">typedef</span> <span class="cm">/*implementation-defined*/</span> <span class="n">iterator</span><span class="p">;</span>
<span class="k">typedef</span> <span class="cm">/*implementation-defined*/</span> <span class="n">const_iterator</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">size_t</span> <span class="n">size_type</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">ptrdiff_t</span> <span class="n">difference_type</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">T</span> <span class="n">value_type</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">T</span><span class="o">*</span> <span class="n">pointer</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">T</span> <span class="k">const</span><span class="o">*</span> <span class="n">const_pointer</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">sprout</span><span class="o">::</span><span class="n">reverse_iterator</span><span class="o">&lt;</span><span class="n">iterator</span><span class="o">&gt;</span> <span class="n">reverse_iterator</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">sprout</span><span class="o">::</span><span class="n">reverse_iterator</span><span class="o">&lt;</span><span class="n">const_iterator</span><span class="o">&gt;</span> <span class="n">const_reverse_iterator</span><span class="p">;</span>
<span class="c1">// types:</span>
<span class="k">typedef</span> <span class="n">T</span><span class="o">&amp;</span> <span class="n">reference</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">T</span> <span class="k">const</span><span class="o">&amp;</span> <span class="n">const_reference</span><span class="p">;</span>
<span class="k">typedef</span> <span class="cm">/*implementation-defined*/</span> <span class="n">iterator</span><span class="p">;</span>
<span class="k">typedef</span> <span class="cm">/*implementation-defined*/</span> <span class="n">const_iterator</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">size_t</span> <span class="n">size_type</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">ptrdiff_t</span> <span class="n">difference_type</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">T</span> <span class="n">value_type</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">T</span><span class="o">*</span> <span class="n">pointer</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">T</span> <span class="k">const</span><span class="o">*</span> <span class="n">const_pointer</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">sprout</span><span class="o">::</span><span class="n">reverse_iterator</span><span class="o">&lt;</span><span class="n">iterator</span><span class="o">&gt;</span> <span class="n">reverse_iterator</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">sprout</span><span class="o">::</span><span class="n">reverse_iterator</span><span class="o">&lt;</span><span class="n">const_iterator</span><span class="o">&gt;</span> <span class="n">const_reverse_iterator</span><span class="p">;</span>
<span class="c1">// constants:</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="n">size_type</span> <span class="n">static_size</span> <span class="o">=</span> <span class="n">N</span><span class="p">;</span>
<span class="c1">// constants:</span>
<span class="n">SPROUT_STATIC_CONSTEXPR</span> <span class="n">size_type</span> <span class="n">static_size</span> <span class="o">=</span> <span class="n">N</span><span class="p">;</span>
<span class="n">T</span> <span class="n">elems</span><span class="p">[</span><span class="n">N</span> <span class="o">?</span> <span class="n">N</span> <span class="o">:</span> <span class="mi">1</span><span class="p">];</span> <span class="c1">// exposition only</span>
<span class="n">T</span> <span class="n">elems</span><span class="p">[</span><span class="n">N</span> <span class="o">?</span> <span class="n">N</span> <span class="o">:</span> <span class="mi">1</span><span class="p">];</span> <span class="c1">// exposition only</span>
<span class="c1">// construct/copy/destroy:</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">T2</span><span class="o">&gt;</span>
<span class="n">array</span><span class="o">&amp;</span> <span class="k">operator</span><span class="o">=</span><span class="p">(</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T2</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;</span> <span class="k">const</span><span class="o">&amp;</span> <span class="n">rhs</span><span class="p">);</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">T2</span><span class="o">&gt;</span>
<span class="n">array</span><span class="o">&amp;</span> <span class="k">operator</span><span class="o">=</span><span class="p">(</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T2</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;&amp;&amp;</span> <span class="n">rhs</span><span class="p">);</span>
<span class="c1">// construct/copy/destroy:</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">T2</span><span class="o">&gt;</span>
<span class="n">array</span><span class="o">&amp;</span> <span class="k">operator</span><span class="o">=</span><span class="p">(</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T2</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;</span> <span class="k">const</span><span class="o">&amp;</span> <span class="n">rhs</span><span class="p">);</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">T2</span><span class="o">&gt;</span>
<span class="n">array</span><span class="o">&amp;</span> <span class="k">operator</span><span class="o">=</span><span class="p">(</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T2</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;&amp;&amp;</span> <span class="n">rhs</span><span class="p">);</span>
<span class="c1">// modifiers:</span>
<span class="kt">void</span> <span class="n">fill</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">u</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">array</span> <span class="n">fill</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
<span class="kt">void</span> <span class="n">assign</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">array</span> <span class="n">assign</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
<span class="kt">void</span> <span class="n">swap</span><span class="p">(</span><span class="n">array</span><span class="o">&amp;</span><span class="p">)</span> <span class="n">SPROUT_NOEXCEPT_EXPR</span><span class="p">(</span><span class="n">SPROUT_NOEXCEPT_EXPR</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">swap</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&amp;&gt;</span><span class="p">(),</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&amp;&gt;</span><span class="p">())));</span>
<span class="c1">// modifiers:</span>
<span class="kt">void</span> <span class="n">fill</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">array</span> <span class="n">fill</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
<span class="kt">void</span> <span class="n">assign</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">array</span> <span class="n">assign</span><span class="p">(</span><span class="n">const_reference</span> <span class="n">value</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
<span class="kt">void</span> <span class="n">swap</span><span class="p">(</span><span class="n">array</span><span class="o">&amp;</span><span class="p">)</span> <span class="n">SPROUT_NOEXCEPT_EXPR</span><span class="p">(</span><span class="n">SPROUT_NOEXCEPT_EXPR</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">swap</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&amp;&gt;</span><span class="p">(),</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&amp;&gt;</span><span class="p">())));</span>
<span class="c1">// iterators:</span>
<span class="n">iterator</span> <span class="n">begin</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_iterator</span> <span class="n">begin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">iterator</span> <span class="n">end</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_iterator</span> <span class="n">end</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">reverse_iterator</span> <span class="n">rbegin</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">rbegin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">reverse_iterator</span> <span class="n">rend</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">rend</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<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>
<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>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">crbegin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">crend</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="c1">// iterators:</span>
<span class="n">iterator</span> <span class="n">begin</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_iterator</span> <span class="n">begin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">iterator</span> <span class="n">end</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_iterator</span> <span class="n">end</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">reverse_iterator</span> <span class="n">rbegin</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">rbegin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">reverse_iterator</span> <span class="n">rend</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">rend</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<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>
<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>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">crbegin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">crend</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="c1">// capacity:</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">size_type</span> <span class="n">size</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">size_type</span> <span class="n">max_size</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span> <span class="n">empty</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="c1">// capacity:</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">size_type</span> <span class="n">size</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">size_type</span> <span class="n">max_size</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="kt">bool</span> <span class="n">empty</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="c1">// element access:</span>
<span class="n">reference</span> <span class="k">operator</span><span class="p">[](</span><span class="n">size_type</span> <span class="n">n</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="k">operator</span><span class="p">[](</span><span class="n">size_type</span> <span class="n">n</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
<span class="n">reference</span> <span class="n">at</span><span class="p">(</span><span class="n">size_type</span> <span class="n">n</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">at</span><span class="p">(</span><span class="n">size_type</span> <span class="n">n</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
<span class="n">reference</span> <span class="n">front</span><span class="p">();</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">front</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="n">reference</span> <span class="n">back</span><span class="p">();</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">back</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="n">pointer</span> <span class="n">data</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_pointer</span> <span class="n">data</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<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>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_pointer</span> <span class="n">c_array</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="c1">// element access:</span>
<span class="n">reference</span> <span class="k">operator</span><span class="p">[](</span><span class="n">size_type</span> <span class="n">n</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="k">operator</span><span class="p">[](</span><span class="n">size_type</span> <span class="n">n</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
<span class="n">reference</span> <span class="n">at</span><span class="p">(</span><span class="n">size_type</span> <span class="n">n</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">at</span><span class="p">(</span><span class="n">size_type</span> <span class="n">n</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
<span class="n">reference</span> <span class="n">front</span><span class="p">();</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">front</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="n">reference</span> <span class="n">back</span><span class="p">();</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="n">back</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="n">pointer</span> <span class="n">data</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_pointer</span> <span class="n">data</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<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>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_pointer</span> <span class="n">c_array</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="p">};</span>
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<div class="section" id="member-types">
<h3>Member types<a class="headerlink" href="#member-types" title="Permalink to this headline"></a></h3>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="50%" />
<col width="25%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">type</th>
<th class="head">definition</th>
<th class="head">note</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>reference</td>
<td>T&amp;</td>
<td>&nbsp;</td>
</tr>
<tr><td>const_reference</td>
<td>T const&amp;</td>
<td>&nbsp;</td>
</tr>
<tr><td>iterator</td>
<td><em>implementation-defined</em>,
<strong>ConstexprRandomAccessIterator</strong></td>
<td>convertible to const_iterator,
convertible to pointer</td>
</tr>
<tr><td>const_iterator</td>
<td><em>implementation-defined</em>,
<strong>ConstexprRandomAccessIterator</strong></td>
<td>convertible to const_pointer</td>
</tr>
<tr><td>size_type</td>
<td>std::size_t</td>
<td>&nbsp;</td>
</tr>
<tr><td>difference_type</td>
<td>std::ptrdiff_t</td>
<td>&nbsp;</td>
</tr>
<tr><td>value_type</td>
<td>T</td>
<td>&nbsp;</td>
</tr>
<tr><td>pointer</td>
<td>T*</td>
<td>&nbsp;</td>
</tr>
<tr><td>const_pointer</td>
<td>T const*</td>
<td>&nbsp;</td>
</tr>
<tr><td>reverse_iterator</td>
<td>sprout::reverse_iterator&lt;iterator&gt;,
<strong>ConstexprRandomAccessIterator</strong></td>
<td>&nbsp;</td>
</tr>
<tr><td>const_reverse_iterator</td>
<td>sprout::reverse_iterator&lt;const_iterator&gt;,
<strong>ConstexprRandomAccessIterator</strong></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="member-functions">
<h3>Member functions<a class="headerlink" href="#member-functions" title="Permalink to this headline"></a></h3>
<div class="section" id="initializer">
<h4>(initializer)<a class="headerlink" href="#initializer" title="Permalink to this headline"></a></h4>
<ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">(initializer)</span></tt></li>
</ul>
</div>
<div class="section" id="construct-copy-destroy">
<h4>construct/copy/destroy<a class="headerlink" href="#construct-copy-destroy" title="Permalink to this headline"></a></h4>
<ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">operator=</span></tt></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="initializer-.html"><em>(initializer)</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="modifiers">
<h4>modifiers<a class="headerlink" href="#modifiers" title="Permalink to this headline"></a></h4>
<ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">fill</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">assign</span></tt></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="fill.html"><em>fill</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="assign.html"><em>assign</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="swap.html"><em>swap</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="iterators">
<h4>iterators<a class="headerlink" href="#iterators" title="Permalink to this headline"></a></h4>
<ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">begin</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">end</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">rbegin</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">rend</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">cbegin</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">cend</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">crbegin</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">crend</span></tt></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="begin.html"><em>begin</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="end.html"><em>end</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="rbegin.html"><em>rbegin</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="rend.html"><em>rend</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="cbegin.html"><em>cbegin</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="cend.html"><em>cend</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="crbegin.html"><em>crbegin</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="crend.html"><em>crend</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="capacity">
<h4>capacity<a class="headerlink" href="#capacity" title="Permalink to this headline"></a></h4>
<ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">size</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">max_size</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">empty</span></tt></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="size.html"><em>size</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="max_size.html"><em>max_size</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="empty.html"><em>empty</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="element-access">
<h4>element access<a class="headerlink" href="#element-access" title="Permalink to this headline"></a></h4>
<ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">operator[]</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">at</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">front</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">back</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">data</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">c_array</span></tt></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="operator-subscript.html"><em>operator[]</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="at.html"><em>at</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="front.html"><em>front</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="back.html"><em>back</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="data.html"><em>data</em></a></td>
<td>&nbsp;</td>
</tr>
<tr><td><a class="reference external" href="c_array.html"><em>c_array</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@ -197,9 +356,9 @@
<li><a class="reference external" href="#">Class template array</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#description">Description</a><ul>
<li><a class="reference external" href="#member-types">Member types</a></li>
<li><a class="reference external" href="#member-functions">Member functions</a><ul>
<li><a class="reference external" href="#initializer">(initializer)</a></li>
<li><a class="reference external" href="#construct-copy-destroy">construct/copy/destroy</a></li>
<li><a class="reference external" href="#modifiers">modifiers</a></li>
<li><a class="reference external" href="#iterators">iterators</a></li>
<li><a class="reference external" href="#capacity">capacity</a></li>
@ -217,8 +376,8 @@
<p class="topless"><a href="../index.html"
title="previous chapter">Sprout.Array</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../../algorithm/index.html"
title="next chapter">Sprout.Algorithm</a></p>
<p class="topless"><a href="initializer-.html"
title="next chapter">(initializer)</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/index.txt"
@ -248,7 +407,7 @@
<a href="../../../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../../algorithm/index.html" title="Sprout.Algorithm"
<a href="initializer-.html" title="(initializer)"
>next</a> |</li>
<li class="right" >
<a href="../index.html" title="Sprout.Array"

View file

@ -0,0 +1,160 @@
<!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" />
<title>(initializer) &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="operator=" href="operator-assign.html" />
<link rel="prev" title="Class template array" href="index.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="operator-assign.html" title="operator="
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Class template array"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="initializer">
<h1>(initializer)<a class="headerlink" href="#initializer" title="Permalink to this headline"></a></h1>
<div class="section" id="remarks">
<h2>Remarks<a class="headerlink" href="#remarks" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">An array is an aggregate that can be initialized with the syntax</div>
</div>
<div class="highlight-c++"><div class="highlight"><pre><span class="n">array</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;</span> <span class="n">a</span> <span class="o">=</span> <span class="p">{</span> <span class="n">initializer</span><span class="o">-</span><span class="n">list</span> <span class="p">};</span>
</pre></div>
</div>
<div class="line-block">
<div class="line">where initializer-list is a comma-separated list of up to N elements whose types are convertible to T.</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/array.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="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>
</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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">(initializer)</a><ul>
<li><a class="reference external" href="#remarks">Remarks</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Class template array</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="operator-assign.html"
title="next chapter">operator=</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/initializer-.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" size="18" />
<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="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="operator-assign.html" title="operator="
>next</a> |</li>
<li class="right" >
<a href="index.html" title="Class template array"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,162 @@
<!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" />
<title>max_size &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="empty" href="empty.html" />
<link rel="prev" title="size" href="size.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="empty.html" title="empty"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="size.html" title="size"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="max-size">
<h1>max_size<a class="headerlink" href="#max-size" 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">size_type</span> <span class="n">max_size</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">The number of elements contained in the array.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">max_size</span><span class="p">()</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;input max size is 10.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">max_size</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="size.html"
title="previous chapter">size</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="empty.html"
title="next chapter">empty</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/max_size.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" size="18" />
<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="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="empty.html" title="empty"
>next</a> |</li>
<li class="right" >
<a href="size.html" title="size"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,166 @@
<!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" />
<title>operator= &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="fill" href="fill.html" />
<link rel="prev" title="(initializer)" href="initializer-.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="fill.html" title="fill"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="initializer-.html" title="(initializer)"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="operator">
<h1>operator=<a class="headerlink" href="#operator" 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">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">T2</span><span class="o">&gt;</span>
<span class="n">array</span><span class="o">&amp;</span> <span class="k">operator</span><span class="o">=</span><span class="p">(</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T2</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;</span> <span class="k">const</span><span class="o">&amp;</span> <span class="n">rhs</span><span class="p">);</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">T2</span><span class="o">&gt;</span>
<span class="n">array</span><span class="o">&amp;</span> <span class="k">operator</span><span class="o">=</span><span class="p">(</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T2</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;&amp;&amp;</span> <span class="n">rhs</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"><tt class="docutils literal"><span class="pre">std::copy(rhs.begin(),</span> <span class="pre">rhs.end(),</span> <span class="pre">begin())</span></tt>, <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 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"><tt class="docutils literal"><span class="pre">*this</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/array.hpp&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</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">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">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>
</pre></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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">operator=</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#effects">Effects</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="initializer-.html"
title="previous chapter">(initializer)</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="fill.html"
title="next chapter">fill</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/operator-assign.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" size="18" />
<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="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="fill.html" title="fill"
>next</a> |</li>
<li class="right" >
<a href="initializer-.html" title="(initializer)"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,171 @@
<!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" />
<title>operator[] &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="front" href="front.html" />
<link rel="prev" title="at" href="at.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="front.html" title="front"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="at.html" title="at"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="operator">
<h1>operator[]<a class="headerlink" href="#operator" 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">reference</span> <span class="k">operator</span><span class="p">[](</span><span class="n">size_type</span> <span class="n">n</span><span class="p">);</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reference</span> <span class="k">operator</span><span class="p">[](</span><span class="n">size_type</span> <span class="n">n</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
</pre></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">
<div class="line">The element at the specified position in the array.</div>
</div>
</div>
<div class="section" id="remarks">
<h2>Remarks<a class="headerlink" href="#remarks" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">It causes undefined behavior if n is out of bounds.</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/array.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="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="n">input</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span> <span class="o">==</span> <span class="mi">6</span><span class="p">,</span> <span class="s">&quot;an element at position 5 is 6.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">operator[]</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#remarks">Remarks</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="at.html"
title="previous chapter">at</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="front.html"
title="next chapter">front</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/operator-subscript.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" size="18" />
<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="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="front.html" title="front"
>next</a> |</li>
<li class="right" >
<a href="at.html" title="at"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!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" />
<title>rbegin &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="rend" href="rend.html" />
<link rel="prev" title="end" href="end.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="rend.html" title="rend"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="end.html" title="end"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="rbegin">
<h1>rbegin<a class="headerlink" href="#rbegin" 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">reverse_iterator</span> <span class="n">rbegin</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">rbegin</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">reverse iterator for the first element of reverse iteration.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">rbegin</span><span class="p">()</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;input first element of reverse iteration is 10.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">rbegin</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="end.html"
title="previous chapter">end</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="rend.html"
title="next chapter">rend</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/rbegin.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" size="18" />
<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="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="rend.html" title="rend"
>next</a> |</li>
<li class="right" >
<a href="end.html" title="end"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,164 @@
<!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" />
<title>rend &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="cbegin" href="cbegin.html" />
<link rel="prev" title="rbegin" href="rbegin.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="cbegin.html" title="cbegin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="rbegin.html" title="rbegin"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="rend">
<h1>rend<a class="headerlink" href="#rend" 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">reverse_iterator</span> <span class="n">rend</span><span class="p">()</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
<span class="n">SPROUT_CONSTEXPR</span> <span class="n">const_reverse_iterator</span> <span class="n">rend</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">reverse iterator for position after the last element in reverse iteration.</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/array.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="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">rend</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 of reverse iteration is 1.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">rend</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="rbegin.html"
title="previous chapter">rbegin</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="cbegin.html"
title="next chapter">cbegin</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/rend.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" size="18" />
<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="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="cbegin.html" title="cbegin"
>next</a> |</li>
<li class="right" >
<a href="rbegin.html" title="rbegin"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,162 @@
<!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" />
<title>size &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="max_size" href="max_size.html" />
<link rel="prev" title="crend" href="crend.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="max_size.html" title="max_size"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="crend.html" title="crend"
accesskey="P">previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="size">
<h1>size<a class="headerlink" href="#size" 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">size_type</span> <span class="n">size</span><span class="p">()</span> <span class="k">const</span> <span class="n">SPROUT_NOEXCEPT</span><span class="p">;</span>
</pre></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">
<div class="line">The number of elements contained in the array.</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/array.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="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="n">input</span><span class="p">.</span><span class="n">size</span><span class="p">()</span> <span class="o">==</span> <span class="mi">10</span><span class="p">,</span> <span class="s">&quot;input size is 10.&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">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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">size</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="crend.html"
title="previous chapter">crend</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="max_size.html"
title="next chapter">max_size</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/size.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" size="18" />
<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="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="max_size.html" title="max_size"
>next</a> |</li>
<li class="right" >
<a href="crend.html" title="crend"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -0,0 +1,173 @@
<!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" />
<title>swap &mdash; Sprout v1.0 documentation</title>
<link rel="stylesheet" href="../../../../_static/default.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_MODINDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../../../_static/jquery.js"></script>
<script type="text/javascript" src="../../../../_static/doctools.js"></script>
<link rel="top" title="Sprout v1.0 documentation" href="../../../../index.html" />
<link rel="up" title="Class template array" href="index.html" />
<link rel="next" title="begin" href="begin.html" />
<link rel="prev" title="assign" href="assign.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="begin.html" title="begin"
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 v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Class template array</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="swap">
<h1>swap<a class="headerlink" href="#swap" 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="kt">void</span> <span class="n">swap</span><span class="p">(</span><span class="n">array</span><span class="o">&amp;</span> <span class="n">y</span><span class="p">)</span> <span class="n">SPROUT_NOEXCEPT_EXPR</span><span class="p">(</span><span class="n">SPROUT_NOEXCEPT_EXPR</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">swap</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&amp;&gt;</span><span class="p">(),</span> <span class="n">std</span><span class="o">::</span><span class="n">declval</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&amp;&gt;</span><span class="p">())));</span>
</pre></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">
<div class="line"><tt class="docutils literal"><span class="pre">swap_ranges(begin(),</span> <span class="pre">end(),</span> <span class="pre">y.begin())</span></tt>.</div>
</div>
</div>
<div class="section" id="throws">
<h2>Throws<a class="headerlink" href="#throws" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">Nothing unless one of the element-wise swap calls throws an exception.</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/array.hpp&gt;</span>
<span class="cp">#include &lt;sprout/assert.hpp&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">sprout</span><span class="p">;</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="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>
</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">Linear.</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/array/array.hpp</span></tt></div>
<div class="line">Convenience header: <tt class="docutils literal"><span class="pre">sprout/array.hpp</span></tt></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">swap</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#returns">Returns</a></li>
<li><a class="reference external" href="#throws">Throws</a></li>
<li><a class="reference external" href="#examples">Examples</a></li>
<li><a class="reference external" href="#complexity">Complexity</a></li>
<li><a class="reference external" href="#header">Header</a></li>
</ul>
</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="begin.html"
title="next chapter">begin</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../../../_sources/libs/sprout/array/array/swap.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" size="18" />
<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="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="begin.html" title="begin"
>next</a> |</li>
<li class="right" >
<a href="assign.html" title="assign"
>previous</a> |</li>
<li><a href="../../../../index.html">Sprout v1.0 documentation</a> &raquo;</li>
<li><a href="../../../index.html" >Sprout C++ Libraries</a> &raquo;</li>
<li><a href="../../../libraries.html" >Libraries</a> &raquo;</li>
<li><a href="../index.html" >Sprout.Array</a> &raquo;</li>
<li><a href="index.html" >Class template array</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013, Bolero MURAKAMI.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
</div>
</body>
</html>

View file

@ -50,31 +50,46 @@
<div class="section" id="id1">
<h1>Sprout.Array<a class="headerlink" href="#id1" 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">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">size_t</span> <span class="n">N</span><span class="o">&gt;</span>
<span class="k">class</span> <span class="nc">array</span><span class="p">;</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">size_t</span> <span class="n">N</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="kt">void</span> <span class="n">swap</span><span class="p">(</span><span class="n">sprout</span><span class="o">::</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;&amp;</span> <span class="n">lhs</span><span class="p">,</span> <span class="n">sprout</span><span class="o">::</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;&amp;</span> <span class="n">rhs</span><span class="p">)</span> <span class="n">SPROUT_NOEXCEPT_EXPR</span><span class="p">(</span><span class="n">SPROUT_NOEXCEPT_EXPR</span><span class="p">(</span><span class="n">lhs</span><span class="p">.</span><span class="n">swap</span><span class="p">(</span><span class="n">rhs</span><span class="p">)));</span>
<span class="k">template</span><span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">size_t</span> <span class="n">N</span><span class="o">&gt;</span>
<span class="kr">inline</span> <span class="n">SPROUT_CONSTEXPR</span> <span class="n">sprout</span><span class="o">::</span><span class="n">array</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span> <span class="n">N</span><span class="o">&gt;</span> <span class="n">to_array</span><span class="p">(</span><span class="n">T</span> <span class="k">const</span> <span class="p">(</span><span class="o">&amp;</span> <span class="n">arr</span><span class="p">)[</span><span class="n">N</span><span class="p">]);</span>
</pre></div>
</div>
</div>
<div class="section" id="classes">
<h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference external" href="array/index.html"><em>array</em></a></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">class</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference external" href="array/index.html"><em>array</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="non-member-functions">
<h2>Non-member functions<a class="headerlink" href="#non-member-functions" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">swap</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">to_array</span></tt></li>
</ul>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">function</th>
<th class="head">&nbsp;</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="xref docutils literal"><span class="pre">swap</span></tt></td>
<td>&nbsp;</td>
</tr>
<tr><td><tt class="xref docutils literal"><span class="pre">to_array</span></tt></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="header">
<h2>Header<a class="headerlink" href="#header" title="Permalink to this headline"></a></h2>
@ -91,7 +106,6 @@
<h3><a href="../../../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference external" href="#">Sprout.Array</a><ul>
<li><a class="reference external" href="#interface">Interface</a></li>
<li><a class="reference external" href="#classes">Classes</a></li>
<li><a class="reference external" href="#non-member-functions">Non-member functions</a></li>
<li><a class="reference external" href="#header">Header</a></li>

File diff suppressed because one or more lines are too long

View file

@ -10,17 +10,17 @@ Interface
template<typename ForwardIterator1, typename ForwardIterator2>
inline SPROUT_CONSTEXPR ForwardIterator1
find_end(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
inline SPROUT_CONSTEXPR ForwardIterator1
find_end(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
Effects
========================================

View file

@ -10,17 +10,17 @@ Interface
template<typename InputIterator1, typename ForwardIterator2>
inline SPROUT_CONSTEXPR InputIterator1
find_first_of(
InputIterator1 first1, InputIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
InputIterator1 first1, InputIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
template<typename InputIterator1, typename ForwardIterator2, typename BinaryPredicate>
inline SPROUT_CONSTEXPR InputIterator1
find_first_of(
InputIterator1 first1, InputIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
InputIterator1 first1, InputIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
Effects
========================================

View file

@ -54,78 +54,106 @@ Sprout.Algorithm
Non-modifying sequence operations
*******************************************************************************
* :doc:`all_of <./all_of>`
* :doc:`all_of_equal <./all_of_equal>`
* :doc:`any_of <./any_of>`
* :doc:`any_of_equal <./any_of_equal>`
* :doc:`none_of <./none_of>`
* :doc:`none_of_equal <./none_of_equal>`
* :doc:`one_of <./one_of>`
* :doc:`one_of_equal <./one_of_equal>`
* :doc:`find <./find>`
* :doc:`find_if <./find_if>`
* :doc:`find_if_not <./find_if_not>`
* :doc:`find_end <./find_end>`
* :doc:`find_first_of <./find_first_of>`
* :doc:`adjacent_find <./adjacent_find>`
* :doc:`count <./count>`
* :doc:`count_if <./count_if>`
* :doc:`mismatch <./mismatch>`
* :doc:`equal <./equal>`
* :doc:`is_permutation <./is_permutation>`
* :doc:`search <./search>`
* :doc:`search_n <./search_n>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`all_of <./all_of>`
:doc:`all_of_equal <./all_of_equal>`
:doc:`any_of <./any_of>`
:doc:`any_of_equal <./any_of_equal>`
:doc:`none_of <./none_of>`
:doc:`none_of_equal <./none_of_equal>`
:doc:`one_of <./one_of>`
:doc:`one_of_equal <./one_of_equal>`
:doc:`find <./find>`
:doc:`find_if <./find_if>`
:doc:`find_if_not <./find_if_not>`
:doc:`find_end <./find_end>`
:doc:`find_first_of <./find_first_of>`
:doc:`adjacent_find <./adjacent_find>`
:doc:`count <./count>`
:doc:`count_if <./count_if>`
:doc:`mismatch <./mismatch>`
:doc:`equal <./equal>`
:doc:`is_permutation <./is_permutation>`
:doc:`search <./search>`
:doc:`search_n <./search_n>`
======================================== ===============================================================================
.. _sprout-algorithm-non_modifying-sorting:
Sorting
========================================
* :doc:`is_sorted <./is_sorted>`
* :doc:`is_sorted_until <./is_sorted_until>`
* :doc:`is_increasing <./is_increasing>`
* :doc:`is_decreasing <./is_decreasing>`
* :doc:`is_strictly_increasing <./is_strictly_increasing>`
* :doc:`is_strictly_decreasing <./is_strictly_decreasing>`
================================================================================ ===============================================================================
function
================================================================================ ===============================================================================
:doc:`is_sorted <./is_sorted>`
:doc:`is_sorted_until <./is_sorted_until>`
:doc:`is_increasing <./is_increasing>`
:doc:`is_decreasing <./is_decreasing>`
:doc:`is_strictly_increasing <./is_strictly_increasing>`
:doc:`is_strictly_decreasing <./is_strictly_decreasing>`
================================================================================ ===============================================================================
.. _sprout-algorithm-non_modifying-binary:
Binary search
========================================
* :doc:`lower_bound <./lower_bound>`
* :doc:`upper_bound <./upper_bound>`
* :doc:`equal_range <./equal_range>`
* :doc:`binary_search <./binary_search>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`lower_bound <./lower_bound>`
:doc:`upper_bound <./upper_bound>`
:doc:`equal_range <./equal_range>`
:doc:`binary_search <./binary_search>`
======================================== ===============================================================================
.. _sprout-algorithm-non_modifying-heap:
Heap operations
========================================
* :doc:`is_heap <./is_heap>`
* :doc:`is_heap_until <./is_heap_until>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`is_heap <./is_heap>`
:doc:`is_heap_until <./is_heap_until>`
======================================== ===============================================================================
.. _sprout-algorithm-non_modifying-minmax:
Minimum and maximum
========================================
* :doc:`min <./min>`
* :doc:`max <./max>`
* :doc:`minmax <./minmax>`
* :doc:`min_element <./min_element>`
* :doc:`max_element <./max_element>`
* :doc:`minmax_element <./minmax_element>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`min <./min>`
:doc:`max <./max>`
:doc:`minmax <./minmax>`
:doc:`min_element <./min_element>`
:doc:`max_element <./max_element>`
:doc:`minmax_element <./minmax_element>`
======================================== ===============================================================================
.. _sprout-algorithm-non_modifying-lexicographical:
Lexicographical comparison
========================================
* :doc:`lexicographical_compare <./lexicographical_compare>`
* :doc:`tristate_lexicographical_compare <./tristate_lexicographical_compare>`
================================================================================ ===============================================================================
function
================================================================================ ===============================================================================
:doc:`lexicographical_compare <./lexicographical_compare>`
:doc:`tristate_lexicographical_compare <./tristate_lexicographical_compare>`
================================================================================ ===============================================================================
.. _sprout-algorithm-non_modifying-clamp:
Clamp algorithm
========================================
* :doc:`clamp <./clamp>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`clamp <./clamp>`
======================================== ===============================================================================
Header
========================================

View file

@ -10,17 +10,17 @@ Interface
template<typename InputIterator1, typename InputIterator2>
inline SPROUT_CONSTEXPR bool
lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
);
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
);
template<typename InputIterator1, typename InputIterator2, typename Compare>
inline SPROUT_CONSTEXPR bool
lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
);
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
);
Returns
========================================
@ -37,8 +37,8 @@ Remarks
.. sourcecode:: c++
for (; first1 != last1 && first2 != last2; ++first1, ++first2) {
if (*first1 < *first2) return true;
if (*first2 < *first1) return false;
if (*first1 < *first2) return true;
if (*first2 < *first1) return false;
}
return first1 == last1 && first2 != last2;

View file

@ -10,17 +10,17 @@ Interface
template<typename ForwardIterator1, typename ForwardIterator2>
inline SPROUT_CONSTEXPR ForwardIterator1
search(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2
);
template<typename ForwardIterator1, typename ForwardIterator2, typename BinaryPredicate>
inline SPROUT_CONSTEXPR ForwardIterator1
search(
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
ForwardIterator1 first1, ForwardIterator1 last1,
ForwardIterator2 first2, ForwardIterator2 last2,
BinaryPredicate pred
);
Effects
========================================

View file

@ -10,17 +10,17 @@ Interface
template<typename InputIterator1, typename InputIterator2>
inline SPROUT_CONSTEXPR int
tristate_lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
);
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2
);
template<typename InputIterator1, typename InputIterator2, typename Compare>
inline SPROUT_CONSTEXPR int
tristate_lexicographical_compare(
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
);
InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2,
Compare comp
);
Returns
========================================

View file

@ -0,0 +1,55 @@
.. _sprout-array-array-assign:
###############################################################################
assign
###############################################################################
Interface
========================================
.. sourcecode:: c++
void assign(const_reference value);
SPROUT_CONSTEXPR array assign(const_reference value) const;
Effects
========================================
| ``std::fill_n(begin(), N, value)``, or without effects in the case of const version.
Returns
========================================
| void, or array filled with value in the case of const version.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
#include <sprout/assert.hpp>
using namespace sprout;
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.");
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
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.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,44 @@
.. _sprout-array-array-at:
###############################################################################
at
###############################################################################
Interface
========================================
.. sourcecode:: c++
reference at(size_type n);
SPROUT_CONSTEXPR const_reference at(size_type n) const;
Returns
========================================
| The element at the specified position in the array.
Throws
========================================
| It throws std::out_of_range if n is out of bounds.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.at(5) == 6, "an element at position 5 is 6.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-back:
###############################################################################
back
###############################################################################
Interface
========================================
.. sourcecode:: c++
reference back();
SPROUT_CONSTEXPR const_reference back() const;
Returns
========================================
| A reference to the last element in the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.back() == 10, "a last element is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-begin:
###############################################################################
begin
###############################################################################
Interface
========================================
.. sourcecode:: c++
iterator begin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT;
Returns
========================================
| iterator for the first element.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*input.begin() == 1, "input first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-c_array:
###############################################################################
back
###############################################################################
Interface
========================================
.. sourcecode:: c++
pointer c_array() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT;
Returns
========================================
| Pointer to the data contained by the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.c_array()[0] == 1, "a first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-cbegin:
###############################################################################
cbegin
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
Returns
========================================
| iterator for the first element always const.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
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, "input first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-cbegin:
###############################################################################
cbegin
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
Returns
========================================
| iterator for position after the last element always const.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
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) == 1, "input last element is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-crbegin:
###############################################################################
crbegin
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT;
Returns
========================================
| reverse iterator for the first element of reverse iteration always const.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*input.crbegin() == 10, "input first element of reverse iteration is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-crend:
###############################################################################
crend
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT;
Returns
========================================
| reverse iterator for position after the last element in reverse iteration always const.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*(input.crend() - 1) == 1, "input last element of reverse iteration is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-data:
###############################################################################
back
###############################################################################
Interface
========================================
.. sourcecode:: c++
pointer data() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT;
Returns
========================================
| Pointer to the data contained by the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.data()[0] == 1, "a first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-empty:
###############################################################################
empty
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT;
Returns
========================================
| true if the array size is 0, false otherwise.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 0>{{}};
static_assert(input.empty() == 10, "input is empty.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-end:
###############################################################################
end
###############################################################################
Interface
========================================
.. sourcecode:: c++
iterator end() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT;
Returns
========================================
| iterator for position after the last element.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
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.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,55 @@
.. _sprout-array-array-fill:
###############################################################################
fill
###############################################################################
Interface
========================================
.. sourcecode:: c++
void fill(const_reference value);
SPROUT_CONSTEXPR array fill(const_reference value) const;
Effects
========================================
| ``std::fill_n(begin(), N, value)``, or without effects in the case of const version.
Returns
========================================
| void, or array filled with value in the case of const version.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
#include <sprout/assert.hpp>
using namespace sprout;
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.");
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
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.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-front:
###############################################################################
front
###############################################################################
Interface
========================================
.. sourcecode:: c++
reference front();
SPROUT_CONSTEXPR const_reference front() const;
Returns
========================================
| A reference to the first element in the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.front() == 1, "a first element is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -6,128 +6,189 @@ Class template array
.. toctree::
:hidden:
initializer-
operator-assign
fill
assign
swap
begin
end
rbegin
rend
cbegin
cend
crbegin
crend
size
max_size
empty
at
operator-subscript
front
back
data
c_array
Interface
========================================
.. sourcecode:: c++
template <typename T, std::size_t N>
class array {
// types:
typedef T& reference;
typedef T const& const_reference;
typedef /*implementation-defined*/ iterator;
typedef /*implementation-defined*/ const_iterator;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef T value_type;
typedef T* pointer;
typedef T const* const_pointer;
typedef sprout::reverse_iterator<iterator> reverse_iterator;
typedef sprout::reverse_iterator<const_iterator> const_reverse_iterator;
// types:
typedef T& reference;
typedef T const& const_reference;
typedef /*implementation-defined*/ iterator;
typedef /*implementation-defined*/ const_iterator;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
typedef T value_type;
typedef T* pointer;
typedef T const* const_pointer;
typedef sprout::reverse_iterator<iterator> reverse_iterator;
typedef sprout::reverse_iterator<const_iterator> const_reverse_iterator;
// constants:
SPROUT_STATIC_CONSTEXPR size_type static_size = N;
// constants:
SPROUT_STATIC_CONSTEXPR size_type static_size = N;
T elems[N ? N : 1]; // exposition only
T elems[N ? N : 1]; // exposition only
// construct/copy/destroy:
template<typename T2>
array& operator=(array<T2, N> const& rhs);
template<typename T2>
array& operator=(array<T2, N>&& rhs);
// construct/copy/destroy:
template<typename T2>
array& operator=(array<T2, N> const& rhs);
template<typename T2>
array& operator=(array<T2, N>&& rhs);
// modifiers:
void fill(const_reference u);
SPROUT_CONSTEXPR array fill(const_reference value) const;
void assign(const_reference value);
SPROUT_CONSTEXPR array assign(const_reference value) const;
void swap(array&) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval<T&>(), std::declval<T&>())));
// modifiers:
void fill(const_reference value);
SPROUT_CONSTEXPR array fill(const_reference value) const;
void assign(const_reference value);
SPROUT_CONSTEXPR array assign(const_reference value) const;
void swap(array&) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval<T&>(), std::declval<T&>())));
// iterators:
iterator begin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT;
iterator end() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT;
reverse_iterator rbegin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT;
reverse_iterator rend() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT;
// iterators:
iterator begin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator begin() const SPROUT_NOEXCEPT;
iterator end() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator end() const SPROUT_NOEXCEPT;
reverse_iterator rbegin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT;
reverse_iterator rend() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_iterator cend() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator crbegin() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator crend() const SPROUT_NOEXCEPT;
// capacity:
SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT;
// capacity:
SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR bool empty() const SPROUT_NOEXCEPT;
// element access:
reference operator[](size_type n);
SPROUT_CONSTEXPR const_reference operator[](size_type n) const;
reference at(size_type n);
SPROUT_CONSTEXPR const_reference at(size_type n) const;
reference front();
SPROUT_CONSTEXPR const_reference front() const;
reference back();
SPROUT_CONSTEXPR const_reference back() const;
pointer data() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT;
pointer c_array() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT;
// element access:
reference operator[](size_type n);
SPROUT_CONSTEXPR const_reference operator[](size_type n) const;
reference at(size_type n);
SPROUT_CONSTEXPR const_reference at(size_type n) const;
reference front();
SPROUT_CONSTEXPR const_reference front() const;
reference back();
SPROUT_CONSTEXPR const_reference back() const;
pointer data() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer data() const SPROUT_NOEXCEPT;
pointer c_array() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_pointer c_array() const SPROUT_NOEXCEPT;
};
Description
========================================
Member types
----------------------------------------
======================================== =============================================================================== =======================================
type definition note
======================================== =============================================================================== =======================================
reference T&
const_reference T const&
iterator *implementation-defined*, convertible to const_iterator,
**ConstexprRandomAccessIterator** convertible to pointer
const_iterator *implementation-defined*, convertible to const_pointer
**ConstexprRandomAccessIterator**
size_type std::size_t
difference_type std::ptrdiff_t
value_type T
pointer T*
const_pointer T const*
reverse_iterator sprout::reverse_iterator<iterator>,
**ConstexprRandomAccessIterator**
const_reverse_iterator sprout::reverse_iterator<const_iterator>,
**ConstexprRandomAccessIterator**
======================================== =============================================================================== =======================================
Member functions
----------------------------------------
(initializer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`(initializer) <./array/initializer->`
construct/copy/destroy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`operator= <./array/operator-assign>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`(initializer) <./initializer->`
======================================== ===============================================================================
modifiers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`fill <./array/fill>`
* :doc:`assign <./array/assign>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`fill <./fill>`
:doc:`assign <./assign>`
:doc:`swap <./swap>`
======================================== ===============================================================================
iterators
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`begin <./array/begin>`
* :doc:`end <./array/end>`
* :doc:`rbegin <./array/rbegin>`
* :doc:`rend <./array/rend>`
* :doc:`cbegin <./array/cbegin>`
* :doc:`cend <./array/cend>`
* :doc:`crbegin <./array/crbegin>`
* :doc:`crend <./array/crend>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`begin <./begin>`
:doc:`end <./end>`
:doc:`rbegin <./rbegin>`
:doc:`rend <./rend>`
:doc:`cbegin <./cbegin>`
:doc:`cend <./cend>`
:doc:`crbegin <./crbegin>`
:doc:`crend <./crend>`
======================================== ===============================================================================
capacity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`size <./array/size>`
* :doc:`max_size <./array/max_size>`
* :doc:`empty <./array/empty>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`size <./size>`
:doc:`max_size <./max_size>`
:doc:`empty <./empty>`
======================================== ===============================================================================
element access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* :doc:`operator[] <./array/operator-subscript>`
* :doc:`at <./array/at>`
* :doc:`front <./array/front>`
* :doc:`back <./array/back>`
* :doc:`data <./array/data>`
* :doc:`c_array <./array/c_array>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`operator[] <./operator-subscript>`
:doc:`at <./at>`
:doc:`front <./front>`
:doc:`back <./back>`
:doc:`data <./data>`
:doc:`c_array <./c_array>`
======================================== ===============================================================================
Header
========================================

View file

@ -0,0 +1,36 @@
.. _sprout-array-array-initializer-:
###############################################################################
(initializer)
###############################################################################
Remarks
========================================
| An array is an aggregate that can be initialized with the syntax
.. sourcecode:: c++
array<T, N> a = { initializer-list };
| where initializer-list is a comma-separated list of up to N elements whose types are convertible to T.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-max_size:
###############################################################################
max_size
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR size_type max_size() const SPROUT_NOEXCEPT;
Returns
========================================
| The number of elements contained in the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.max_size() == 10, "input max size is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,41 @@
.. _sprout-array-array-operator-assign:
###############################################################################
operator=
###############################################################################
Interface
========================================
.. sourcecode:: c++
template<typename T2>
array& operator=(array<T2, N> const& rhs);
template<typename T2>
array& operator=(array<T2, N>&& rhs);
Effects
========================================
| ``std::copy(rhs.begin(), rhs.end(), begin())``, ``std::move(rhs.begin(), rhs.end(), begin())``.
Returns
========================================
| ``*this``.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
auto x = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
x = array<int, 10>{{10, 9, 8, 7, 6, 5, 4, 3, 2, 1}};
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,44 @@
.. _sprout-array-array-operator-subscript:
###############################################################################
operator[]
###############################################################################
Interface
========================================
.. sourcecode:: c++
reference operator[](size_type n);
SPROUT_CONSTEXPR const_reference operator[](size_type n) const;
Returns
========================================
| The element at the specified position in the array.
Remarks
========================================
| It causes undefined behavior if n is out of bounds.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input[5] == 6, "an element at position 5 is 6.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-rbegin:
###############################################################################
rbegin
###############################################################################
Interface
========================================
.. sourcecode:: c++
reverse_iterator rbegin() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rbegin() const SPROUT_NOEXCEPT;
Returns
========================================
| reverse iterator for the first element of reverse iteration.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*input.rbegin() == 10, "input first element of reverse iteration is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,39 @@
.. _sprout-array-array-rend:
###############################################################################
rend
###############################################################################
Interface
========================================
.. sourcecode:: c++
reverse_iterator rend() SPROUT_NOEXCEPT;
SPROUT_CONSTEXPR const_reverse_iterator rend() const SPROUT_NOEXCEPT;
Returns
========================================
| reverse iterator for position after the last element in reverse iteration.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(*(input.rend() - 1) == 1, "input last element of reverse iteration is 1.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,37 @@
.. _sprout-array-array-size:
###############################################################################
size
###############################################################################
Interface
========================================
.. sourcecode:: c++
SPROUT_CONSTEXPR size_type size() const SPROUT_NOEXCEPT;
Returns
========================================
| The number of elements contained in the array.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
using namespace sprout;
SPROUT_STATIC_CONSTEXPR auto input = array<int, 10>{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}};
static_assert(input.size() == 10, "input size is 10.");
Complexity
========================================
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -0,0 +1,46 @@
.. _sprout-array-array-swap:
###############################################################################
swap
###############################################################################
Interface
========================================
.. sourcecode:: c++
void swap(array& y) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(std::swap(std::declval<T&>(), std::declval<T&>())));
Returns
========================================
| ``swap_ranges(begin(), end(), y.begin())``.
Throws
========================================
| Nothing unless one of the element-wise swap calls throws an exception.
Examples
========================================
.. sourcecode:: c++
#include <sprout/array.hpp>
#include <sprout/assert.hpp>
using namespace sprout;
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.");
Complexity
========================================
| Linear.
| Recursive function invocations in *O(1)* (constant) depth.
Header
========================================
| ``sprout/array/array.hpp``
| Convenience header: ``sprout/array.hpp``

View file

@ -8,29 +8,24 @@ Sprout.Array
array/index
Interface
========================================
.. sourcecode:: c++
template <typename T, std::size_t N>
class array;
template<typename T, std::size_t N>
inline void swap(sprout::array<T, N>& lhs, sprout::array<T, N>& rhs) SPROUT_NOEXCEPT_EXPR(SPROUT_NOEXCEPT_EXPR(lhs.swap(rhs)));
template<typename T, std::size_t N>
inline SPROUT_CONSTEXPR sprout::array<T, N> to_array(T const (& arr)[N]);
Classes
========================================
* :doc:`array <./array/index>`
======================================== ===============================================================================
class
======================================== ===============================================================================
:doc:`array <./array/index>`
======================================== ===============================================================================
Non-member functions
========================================
* :doc:`swap <./swap>`
* :doc:`to_array <./to_array>`
======================================== ===============================================================================
function
======================================== ===============================================================================
:doc:`swap <./swap>`
:doc:`to_array <./to_array>`
======================================== ===============================================================================
Header
========================================