512 lines
18 KiB
XML
512 lines
18 KiB
XML
<library-reference>
|
|
<header name="boost/array.hpp">
|
|
<namespace name="boost">
|
|
<class name="array">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
<template-nontype-parameter name="N">
|
|
<type>std::size_t</type>
|
|
</template-nontype-parameter>
|
|
</template>
|
|
|
|
<purpose>
|
|
<para>STL compliant container wrapper for arrays of constant size</para>
|
|
</purpose>
|
|
<typedef name="value_type">
|
|
<type>T</type>
|
|
</typedef>
|
|
<typedef name="iterator">
|
|
<type>T*</type>
|
|
</typedef>
|
|
<typedef name="const_iterator">
|
|
<type>const T*</type>
|
|
</typedef>
|
|
<typedef name="reverse_iterator">
|
|
<type>
|
|
<classname>std::reverse_iterator</classname><iterator>
|
|
</type>
|
|
</typedef>
|
|
<typedef name="const_reverse_iterator">
|
|
<type>
|
|
<classname>std::reverse_iterator</classname><const_iterator>
|
|
</type>
|
|
</typedef>
|
|
<typedef name="reference">
|
|
<type>T&</type>
|
|
</typedef>
|
|
<typedef name="const_reference">
|
|
<type>const T&</type>
|
|
</typedef>
|
|
<typedef name="size_type">
|
|
<type>std::size_t</type>
|
|
</typedef>
|
|
<typedef name="difference_type">
|
|
<type>std::ptrdiff_t</type>
|
|
</typedef>
|
|
|
|
<static-constant name="static_size">
|
|
<type>size_type</type>
|
|
<default>N</default>
|
|
</static-constant>
|
|
|
|
<copy-assignment>
|
|
<template>
|
|
<template-type-parameter name="U"/>
|
|
</template>
|
|
<parameter name="other">
|
|
<paramtype>const <classname>array</classname><U, N>&</paramtype>
|
|
</parameter>
|
|
<effects>
|
|
<simpara>
|
|
<code>
|
|
std::copy(rhs.<methodname>begin</methodname>(),rhs.<methodname>end</methodname>(), <methodname>begin</methodname>())
|
|
</code>
|
|
</simpara>
|
|
</effects>
|
|
</copy-assignment>
|
|
|
|
<method-group name="iterator support">
|
|
<overloaded-method name="begin">
|
|
<signature>
|
|
<type>iterator</type>
|
|
</signature>
|
|
<signature cv="const">
|
|
<type>const_iterator</type>
|
|
</signature>
|
|
|
|
<returns>
|
|
<simpara>iterator for the first element</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw</simpara>
|
|
</throws>
|
|
</overloaded-method>
|
|
|
|
<overloaded-method name="end">
|
|
<signature>
|
|
<type>iterator</type>
|
|
</signature>
|
|
<signature cv="const">
|
|
<type>const_iterator</type>
|
|
</signature>
|
|
|
|
<returns>
|
|
<simpara>iterator for position after the last element</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw</simpara>
|
|
</throws>
|
|
</overloaded-method>
|
|
</method-group>
|
|
|
|
<method-group name="reverse iterator support">
|
|
<overloaded-method name="rbegin">
|
|
<signature>
|
|
<type>reverse_iterator</type>
|
|
</signature>
|
|
<signature cv="const">
|
|
<type>const_reverse_iterator</type>
|
|
</signature>
|
|
|
|
<returns>
|
|
<simpara>reverse iterator for the first element of reverse iteration</simpara>
|
|
</returns>
|
|
</overloaded-method>
|
|
|
|
<overloaded-method name="rend">
|
|
<signature>
|
|
<type>reverse_iterator</type>
|
|
</signature>
|
|
<signature cv="const">
|
|
<type>const_reverse_iterator</type>
|
|
</signature>
|
|
|
|
<returns>
|
|
<simpara>reverse iterator for position after the last element in reverse iteration</simpara>
|
|
</returns>
|
|
</overloaded-method>
|
|
</method-group>
|
|
|
|
<method-group name="capacity">
|
|
<method name="size">
|
|
<type>size_type</type>
|
|
<returns>
|
|
<simpara>
|
|
<code>N</code>
|
|
</simpara>
|
|
</returns>
|
|
</method>
|
|
<method name="empty">
|
|
<type>bool</type>
|
|
<returns>
|
|
<simpara>
|
|
<code>N==0</code>
|
|
</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw</simpara>
|
|
</throws>
|
|
</method>
|
|
<method name="max_size">
|
|
<type>size_type</type>
|
|
<returns>
|
|
<simpara>
|
|
<code>N</code>
|
|
</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw</simpara>
|
|
</throws>
|
|
</method>
|
|
</method-group>
|
|
|
|
<method-group name="element access">
|
|
<overloaded-method name="operator[]">
|
|
<signature>
|
|
<type>reference</type>
|
|
<parameter name="i">
|
|
<paramtype>size_type</paramtype>
|
|
</parameter>
|
|
</signature>
|
|
|
|
<signature cv="const">
|
|
<type>const_reference</type>
|
|
<parameter name="i">
|
|
<paramtype>size_type</paramtype>
|
|
</parameter>
|
|
</signature>
|
|
|
|
<requires>
|
|
<simpara>
|
|
<code>i < N</code>
|
|
</simpara>
|
|
</requires>
|
|
<returns>
|
|
<simpara>
|
|
element with index <code>i</code>
|
|
</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw.</simpara>
|
|
</throws>
|
|
</overloaded-method>
|
|
|
|
<overloaded-method name="at">
|
|
<signature>
|
|
<type>reference</type>
|
|
<parameter name="i">
|
|
<paramtype>size_type</paramtype>
|
|
</parameter>
|
|
</signature>
|
|
|
|
<signature cv="const">
|
|
<type>const_reference</type>
|
|
<parameter name="i">
|
|
<paramtype>size_type</paramtype>
|
|
</parameter>
|
|
</signature>
|
|
|
|
<returns>
|
|
<simpara>
|
|
element with index <code>i</code>
|
|
</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>
|
|
<code>
|
|
<classname>std::range_error</classname>
|
|
</code> if <code>i >= N</code>
|
|
</simpara>
|
|
</throws>
|
|
</overloaded-method>
|
|
|
|
<overloaded-method name="front">
|
|
<signature>
|
|
<type>reference</type>
|
|
</signature>
|
|
<signature cv="const">
|
|
<type>const_reference</type>
|
|
</signature>
|
|
<requires>
|
|
<simpara>
|
|
<code>N > 0</code>
|
|
</simpara>
|
|
</requires>
|
|
<returns>
|
|
<simpara>the first element</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw</simpara>
|
|
</throws>
|
|
</overloaded-method>
|
|
|
|
<overloaded-method name="back">
|
|
<signature>
|
|
<type>reference</type>
|
|
</signature>
|
|
<signature cv="const">
|
|
<type>const_reference</type>
|
|
</signature>
|
|
<requires>
|
|
<simpara>
|
|
<code>N > 0</code>
|
|
</simpara>
|
|
</requires>
|
|
<returns>
|
|
<simpara>the last element</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw</simpara>
|
|
</throws>
|
|
</overloaded-method>
|
|
|
|
<method name="data" cv="const">
|
|
<type>const T*</type>
|
|
<returns>
|
|
<simpara>
|
|
<code>elems</code>
|
|
</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw</simpara>
|
|
</throws>
|
|
</method>
|
|
|
|
<method name="c_array">
|
|
<type>T*</type>
|
|
<returns>
|
|
<simpara>
|
|
<code>elems</code>
|
|
</simpara>
|
|
</returns>
|
|
<throws>
|
|
<simpara>will not throw</simpara>
|
|
</throws>
|
|
</method>
|
|
</method-group>
|
|
|
|
<method-group name="modifiers">
|
|
<method name="swap">
|
|
<type>void</type>
|
|
<parameter name="other">
|
|
<paramtype><classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
<effects>
|
|
<simpara>
|
|
<code>
|
|
std::swap_ranges(<methodname>begin</methodname>(), <methodname>end</methodname>(), other.<methodname>begin</methodname>())
|
|
</code>
|
|
</simpara>
|
|
</effects>
|
|
<complexity>
|
|
<simpara>
|
|
linear in <code>N</code>
|
|
</simpara>
|
|
</complexity>
|
|
</method>
|
|
<method name="assign">
|
|
<type>void</type>
|
|
<parameter name="value">
|
|
<paramtype>const T&</paramtype>
|
|
</parameter>
|
|
<effects>
|
|
<simpara>
|
|
<code>
|
|
std::fill_n(<methodname>begin</methodname>(), N, value)
|
|
</code>
|
|
</simpara>
|
|
</effects>
|
|
</method>
|
|
</method-group>
|
|
|
|
<data-member name="elems[N]">
|
|
<!-- HACK -->
|
|
<type>T</type>
|
|
</data-member>
|
|
|
|
<free-function-group name="specialized algorithms">
|
|
<function name="swap">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
<template-nontype-parameter name="N">
|
|
<type>std::size_t</type>
|
|
</template-nontype-parameter>
|
|
</template>
|
|
|
|
<type>void</type>
|
|
|
|
<parameter name="x">
|
|
<paramtype><classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
<parameter name="y">
|
|
<paramtype><classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
|
|
<effects>
|
|
<simpara>
|
|
<code>
|
|
x.<methodname>swap</methodname>(y)
|
|
</code>
|
|
</simpara>
|
|
</effects>
|
|
<throws>
|
|
<simpara>will not throw.</simpara>
|
|
</throws>
|
|
</function>
|
|
</free-function-group>
|
|
|
|
<free-function-group name="comparisons">
|
|
<function name="operator==">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
<template-nontype-parameter name="N">
|
|
<type>std::size_t</type>
|
|
</template-nontype-parameter>
|
|
</template>
|
|
|
|
<type>bool</type>
|
|
|
|
<parameter name="x">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
<parameter name="y">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
|
|
<returns>
|
|
<simpara>
|
|
<code>
|
|
std::equal(x.<methodname>begin</methodname>(), x.<methodname>end</methodname>(), y.<methodname>begin</methodname>())
|
|
</code>
|
|
</simpara>
|
|
</returns>
|
|
</function>
|
|
|
|
<function name="operator!=">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
<template-nontype-parameter name="N">
|
|
<type>std::size_t</type>
|
|
</template-nontype-parameter>
|
|
</template>
|
|
|
|
<type>bool</type>
|
|
|
|
<parameter name="x">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
<parameter name="y">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
|
|
<returns>
|
|
<simpara>
|
|
<code>!(x == y)</code>
|
|
</simpara>
|
|
</returns>
|
|
</function>
|
|
|
|
<function name="operator<">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
<template-nontype-parameter name="N">
|
|
<type>std::size_t</type>
|
|
</template-nontype-parameter>
|
|
</template>
|
|
|
|
<type>bool</type>
|
|
|
|
<parameter name="x">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
<parameter name="y">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
|
|
<returns>
|
|
<simpara>
|
|
<code>
|
|
std::lexicographical_compare(x.<methodname>begin</methodname>(), x.<methodname>end</methodname>(), y.<methodname>begin</methodname>(), y.<methodname>end</methodname>())
|
|
</code>
|
|
</simpara>
|
|
</returns>
|
|
</function>
|
|
|
|
<function name="operator>">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
<template-nontype-parameter name="N">
|
|
<type>std::size_t</type>
|
|
</template-nontype-parameter>
|
|
</template>
|
|
|
|
<type>bool</type>
|
|
|
|
<parameter name="x">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
<parameter name="y">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
|
|
<returns>
|
|
<simpara>
|
|
<code>y < x</code>
|
|
</simpara>
|
|
</returns>
|
|
</function>
|
|
|
|
<function name="operator<=">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
<template-nontype-parameter name="N">
|
|
<type>std::size_t</type>
|
|
</template-nontype-parameter>
|
|
</template>
|
|
|
|
<type>bool</type>
|
|
|
|
<parameter name="x">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
<parameter name="y">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
|
|
<returns>
|
|
<simpara>
|
|
<code>!(y < x)</code>
|
|
</simpara>
|
|
</returns>
|
|
</function>
|
|
|
|
<function name="operator>=">
|
|
<template>
|
|
<template-type-parameter name="T"/>
|
|
<template-nontype-parameter name="N">
|
|
<type>std::size_t</type>
|
|
</template-nontype-parameter>
|
|
</template>
|
|
|
|
<type>bool</type>
|
|
|
|
<parameter name="x">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
<parameter name="y">
|
|
<paramtype>const <classname>array</classname><T, N>&</paramtype>
|
|
</parameter>
|
|
|
|
<returns>
|
|
<simpara>
|
|
<code>!(x < y)</code>
|
|
</simpara>
|
|
</returns>
|
|
</function>
|
|
</free-function-group>
|
|
</class>
|
|
</namespace>
|
|
</header>
|
|
</library-reference>
|
|
|