Unordered: Document more fine grained requirements.

[SVN r79879]
This commit is contained in:
Daniel James
2012-08-05 18:26:02 +00:00
parent 5be71a0e90
commit 09c546f63a
2 changed files with 207 additions and 9 deletions
+45 -3
View File
@@ -67,14 +67,20 @@ EOL;
<?php if ($map): ?>
<row>
<entry><emphasis>Key</emphasis></entry>
<entry>Key must be Assignable and CopyConstructible.</entry></row>
<entry><code>Key</code> must be <code>Erasable</code> from the container
(i.e. <code>allocator_traits</code> can <code>destroy</code> it).
</entry></row>
<row>
<entry><emphasis>Mapped</emphasis></entry>
<entry>Mapped must be CopyConstructible</entry></row>
<entry><code>Mapped</code> must be <code>Erasable</code> from the container
(i.e. <code>allocator_traits</code> can <code>destroy</code> it).
</entry></row>
<?php else: ?>
<row>
<entry><emphasis>Value</emphasis></entry>
<entry>Value must be Assignable and CopyConstructible</entry></row>
<entry><code>Value</code> must be <code>Erasable</code> from the container
(i.e. <code>allocator_traits</code> can <code>destroy</code> it).
</entry></row>
<?php endif ?>
<row>
<entry><emphasis>Hash</emphasis></entry>
@@ -206,6 +212,11 @@ EOL;
<description>
<para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0.</para>
</description>
<requires>
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
<code>allocator_type</code> need to be <code>DefaultConstructible</code>.
</para>
</requires>
</constructor>
<constructor>
<template>
@@ -237,6 +248,11 @@ EOL;
<description>
<para>Constructs an empty container with at least n buckets, using hf as the hash function, eq as the key equality predicate, a as the allocator and a maximum load factor of 1.0 and inserts the elements from [f, l) into it.</para>
</description>
<requires>
<para>If the defaults are used, <code>hasher</code>, <code>key_equal</code> and
<code>allocator_type</code> need to be <code>DefaultConstructible</code>.
</para>
</requires>
</constructor>
<constructor>
<parameter>
@@ -408,6 +424,11 @@ EOL;
' if and only if there is no element in the container with an equivalent '.$key_name. '.';
?></para>
</description>
<requires>
<para><code>value_type</code> is <code>EmplaceConstructible</code> into
<code>X</code> from <code>args</code>.
</para>
</requires>
<returns>
<?php if ($equivalent_keys): ?>
<para>An iterator pointing to the inserted element.</para>
@@ -453,6 +474,11 @@ EOL;
?></para>
<para><code>hint</code> is a suggestion to where the element should be inserted.</para>
</description>
<requires>
<para><code>value_type</code> is <code>EmplaceConstructible</code> into
<code>X</code> from <code>args</code>.
</para>
</requires>
<returns>
<?php if ($equivalent_keys): ?>
<para>An iterator pointing to the inserted element.</para>
@@ -490,6 +516,9 @@ EOL;
' if and only if there is no element in the container with an equivalent '.$key_name. '.';
?></para>
</description>
<requires>
<para><code>value_type</code> is <code>CopyInsertable</code>.</para>
</requires>
<returns>
<?php if ($equivalent_keys): ?>
<para>An iterator pointing to the inserted element.</para>
@@ -517,6 +546,9 @@ EOL;
' if and only if there is no element in the container with an equivalent '.$key_name. '.';
?></para>
</description>
<requires>
<para><code>value_type</code> is <code>MoveInsertable</code>.</para>
</requires>
<returns>
<?php if ($equivalent_keys): ?>
<para>An iterator pointing to the inserted element.</para>
@@ -549,6 +581,9 @@ EOL;
<?php endif; ?>
<para>hint is a suggestion to where the element should be inserted.</para>
</description>
<requires>
<para><code>value_type</code> is <code>CopyInsertable</code>.</para>
</requires>
<returns>
<?php if ($equivalent_keys): ?>
<para>An iterator pointing to the inserted element.</para>
@@ -581,6 +616,9 @@ EOL;
<?php endif; ?>
<para>hint is a suggestion to where the element should be inserted.</para>
</description>
<requires>
<para><code>value_type</code> is <code>MoveInsertable</code>.</para>
</requires>
<returns>
<?php if ($equivalent_keys): ?>
<para>An iterator pointing to the inserted element.</para>
@@ -612,6 +650,10 @@ EOL;
<description>
<para>Inserts a range of elements into the container. Elements are inserted if and only if there is no element in the container with an equivalent <?php echo $key_name; ?>.</para>
</description>
<requires>
<para><code>value_type</code> is <code>EmplaceConstructible</code> into
<code>X</code> from <code>*first</code>.</para>
</requires>
<throws>
<para>When inserting a single element, if an exception is thrown by an operation other than a call to <code>hasher</code> the function has no effect.</para>
</throws>