Skip to content

Commit

Permalink
Misc. small editorial cleanups.
Browse files Browse the repository at this point in the history
Based on feedback from Daniel Krügler.
  • Loading branch information
geoffromer committed Oct 27, 2015
1 parent cae4c12 commit b62ea63
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 35 deletions.
8 changes: 4 additions & 4 deletions any.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h1><code>any</code> construct/destruct</h1>
<cxx-function>
<cxx-signature>any() noexcept;</cxx-signature>

<cxx-postconditions><code>this-&gt;empty()</code></cxx-postconditions>
<cxx-postconditions><code>this-&gt;empty()</code>.</cxx-postconditions>
</cxx-function>

<cxx-function>
Expand Down Expand Up @@ -152,15 +152,15 @@ <h1><code>any</code> assignments</h1>

<cxx-effects><code>any(rhs).swap(*this)</code>.
No effects if an exception is thrown.</cxx-effects>
<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
<cxx-throws>Any exceptions arising from the copy constructor of the contained object.</cxx-throws>
</cxx-function>

<cxx-function>
<cxx-signature>any&amp; operator=(any&amp;&amp; rhs) noexcept;</cxx-signature>

<cxx-effects><code>any(std::move(rhs)).swap(*this)</code>.</cxx-effects>
<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
<cxx-postconditions>The state of <code>*this</code> is equivalent to the original state of <code>rhs</code>
and <code>rhs</code> is left in a valid but otherwise unspecified state.</cxx-postconditions>
</cxx-function>
Expand All @@ -174,7 +174,7 @@ <h1><code>any</code> assignments</h1>
If <code>is_copy_constructible_v&lt;T&gt;</code> is false, the program is ill-formed.</cxx-requires>
<cxx-effects>Constructs an object <code>tmp</code> of type <code>any</code> that contains an object of type <code>T</code> direct-initialized with <code>std::forward&lt;ValueType&gt;(rhs)</code>, and <code>tmp.swap(*this)</code>.
No effects if an exception is thrown.</cxx-effects>
<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
<cxx-remarks> This operator shall not participate in overload resolution if <code>decay_t&lt;ValueType&gt;</code> is the same type as <code>any</code>.</cxx-remarks>
<cxx-throws>Any exception thrown by the selected constructor of <code>T</code>.</cxx-throws>
</cxx-function>
Expand Down
1 change: 1 addition & 0 deletions cxx14_index.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"algorithms.general": "25.1",
"rand.req.genl": "26.5.1.1",
"rand.req.urng": "26.5.1.3",
"rand.predef": "26.5.5",
"rand.dist.uni.int": "26.5.8.2.1",
"futures.promise": "30.6.5",
"futures.task": "30.6.9",
Expand Down
10 changes: 5 additions & 5 deletions func.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ <h1><code>function</code> construct/copy/destroy</h1>
<cxx-signature>function&amp; operator=(const function&amp; f);</cxx-signature>

<cxx-effects><code>function(allocator_arg, <em>ALLOCATOR_OF</em>(*this), f).swap(*this);</code></cxx-effects>
<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
</cxx-function>

<cxx-function>
<cxx-signature>function&amp; operator=(function&amp;&amp; f);</cxx-signature>

<cxx-effects><code>function(allocator_arg, <em>ALLOCATOR_OF</em>(*this), std::move(f)).swap(*this);</code></cxx-effects>
<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
</cxx-function>

<cxx-ednote>The following <i>Effects</i> element has been fixed and syncs the wording "<code>*this != NULL</code>"
Expand All @@ -225,21 +225,21 @@ <h1><code>function</code> construct/copy/destroy</h1>
<cxx-postconditions><code>!(*this)</code>.
The memory resource returned by <code>get_memory_resource()</code> after the assignment is equivalent to the memory resource before the assignment.
<cxx-note>the address returned by <code>get_memory_resource()</code> might change</cxx-note></cxx-postconditions>
<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
</cxx-function>

<cxx-function>
<cxx-signature>template&lt;class F&gt; function&amp; operator=(F&amp;&amp; f);</cxx-signature>

<cxx-effects><code>function(allocator_arg, <em>ALLOCATOR_OF</em>(*this), std::forward&lt;F&gt;(f)).swap(*this);</code></cxx-effects>
<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
</cxx-function>

<cxx-function>
<cxx-signature>template&lt;class F&gt; function&amp; operator=(reference_wrapper&lt;F&gt; f);</cxx-signature>

<cxx-effects><code>function(allocator_arg, <em>ALLOCATOR_OF</em>(*this), f).swap(*this);</code></cxx-effects>
<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
</cxx-function>
</cxx-section>

Expand Down
12 changes: 6 additions & 6 deletions iterator.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h1><code>ostream_joiner</code> operations</h1>

<cxx-function>
<cxx-signature>template&lt;typename T&gt;
ostream_joiner&lt;DelimT, charT, traits&gt;&amp; operator=(const T&amp; value);</cxx-signature>
ostream_joiner&amp; operator=(const T&amp; value);</cxx-signature>

<cxx-effects>
<pre style="clear:left"><code>if (!first_element)
Expand All @@ -110,16 +110,16 @@ <h1><code>ostream_joiner</code> operations</h1>
</cxx-function>

<cxx-function>
<cxx-signature>ostream_joiner&lt;DelimT, charT, traits&gt;&amp; operator*() noexcept;</cxx-signature>
<cxx-signature>ostream_joiner&amp; operator*() noexcept;</cxx-signature>

<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
</cxx-function>

<cxx-function>
<cxx-signature>ostream_joiner&lt;DelimT, charT, traits&gt;&amp; operator++() noexcept;</cxx-signature>
<cxx-signature>ostream_joiner&lt;DelimT, charT, traits&gt;&amp; operator++(int) noexcept;</cxx-signature>
<cxx-signature>ostream_joiner&amp; operator++() noexcept;</cxx-signature>
<cxx-signature>ostream_joiner&amp; operator++(int) noexcept;</cxx-signature>

<cxx-returns><code>*this</code></cxx-returns>
<cxx-returns><code>*this</code>.</cxx-returns>
</cxx-function>
</cxx-section>

Expand Down
14 changes: 7 additions & 7 deletions memory.html
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ <h1><code>shared_ptr</code> constructors</h1>

<cxx-effects>Constructs a <code>shared_ptr</code> instance that stores <code>p</code> and <i>shares ownership</i> with <code>r</code>.</cxx-effects>

<cxx-postconditions><code>get() == p &amp;&amp; use_count() == r.use_count()</code></cxx-postconditions>
<cxx-postconditions><code>get() == p &amp;&amp; use_count() == r.use_count()</code>.</cxx-postconditions>

<p>
<cxx-note>To avoid the possibility of a dangling pointer, the user of this constructor must ensure that <code>p</code> remains valid at least until the ownership group of <code>r</code> is destroyed.</cxx-note>
Expand Down Expand Up @@ -502,7 +502,7 @@ <h1><code>shared_ptr</code> casts</h1>

<cxx-requires>The expression <code>static_cast&lt;T*&gt;((U*)0)</code> shall be well formed.</cxx-requires>

<cxx-returns><code>shared_ptr&lt;T&gt;(r, static_cast&lt;typename shared_ptr&lt;T&gt;::element_type*&gt;(r.get()))</code></cxx-returns>
<cxx-returns><code>shared_ptr&lt;T&gt;(r, static_cast&lt;typename shared_ptr&lt;T&gt;::element_type*&gt;(r.get()))</code>.</cxx-returns>

<p>
<cxx-note>The seemingly equivalent expression <code>shared_ptr&lt;T>(static_cast&lt;T*>(r.get()))</code> will eventually result in undefined behavior, attempting to delete the same object twice.</cxx-note>
Expand Down Expand Up @@ -902,7 +902,7 @@ <h1><code>polymorphic_allocator</code> constructors</h1>

<cxx-requires><code>r</code> is non-null.</cxx-requires>
<cxx-effects>Sets <code>m_resource</code> to <code>r</code>.</cxx-effects>
<cxx-throws>Nothing</cxx-throws>
<cxx-throws>Nothing.</cxx-throws>
<cxx-notes>This constructor provides an implicit conversion from <code>memory_resource*</code>.</cxx-notes>
</cxx-function>

Expand Down Expand Up @@ -1035,7 +1035,7 @@ <h1>polymorphic_allocator equality</h1>
<cxx-signature>template &lt;class T1, class T2>
bool operator!=(const polymorphic_allocator&lt;T1>& a,
const polymorphic_allocator&lt;T2>& b) noexcept;</cxx-signature>
<cxx-returns><code>! (a == b)</code></cxx-returns>
<cxx-returns><code>! (a == b)</code>.</cxx-returns>
</cxx-function>
</cxx-section>
</cxx-section>
Expand Down Expand Up @@ -1379,7 +1379,7 @@ <h1>pool resource members</h1>

<cxx-effects>Return the memory at <code>p</code> to the pool.
It is unspecified if or under what circumstances this operation will result in a call to <code>upstream_resource()->deallocate()</code>.</cxx-effects>
<cxx-throws>Nothing</cxx-throws>
<cxx-throws>Nothing.</cxx-throws>
</cxx-function>

<cxx-function>
Expand Down Expand Up @@ -1520,8 +1520,8 @@ <h1>monotonic_buffer_resource members</h1>

<cxx-function>
<cxx-signature>void do_deallocate(void* p, size_t bytes, size_t alignment);</cxx-signature>
<cxx-effects>None</cxx-effects>
<cxx-throws>Nothing</cxx-throws>
<cxx-effects>None.</cxx-effects>
<cxx-throws>Nothing.</cxx-throws>
<cxx-remarks>Memory used by this resource increases monotonically until its destruction.</cxx-remarks>
</cxx-function>

Expand Down
12 changes: 7 additions & 5 deletions numeric.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ <h1>Header <code>&lt;experimental/random></code> synopsis</h1>
<h1>Utilities</h1>
<cxx-section id="rand.util.randint">
<h1>Function template <code>randint</code></h1>
<p>A separate <dfn>per-thread engine</dfn> of type <code>default_random_engine</code>,
initialized to an unpredictable state, shall be maintained for each thread.</p>
<p>A separate <dfn>per-thread engine</dfn> of type <code>default_random_engine</code>
(<cxx-ref in="cxx" to="rand.predef"></cxx-ref>), initialized to an
unpredictable state, shall be maintained for each thread.</p>
<cxx-function>
<cxx-signature>template&lt;class IntType>
IntType randint(IntType a, IntType b);</cxx-signature>
<cxx-requires><code>a</code><code>b</code>. If the template argument
does not meet the requirements for <code>IntType</code> (<cxx-ref in="cxx" to="rand.req.genl"></cxx-ref>),
the program is ill-formed.</cxx-requires>
<cxx-requires><code>a</code><code>b</code>.</cxx-requires>
<cxx-remarks>If the template argument does not meet the requirements
for <code>IntType</code> (<cxx-ref in="cxx" to="rand.req.genl"></cxx-ref>),
the program is ill-formed.</cxx-remarks>
<cxx-returns>A random integer <var>i</var>, <code>a</code><var>i</var><code>b</code>,
produced from a thread-local instance of <code>uniform_int_distribution&lt;IntType></code>
(<cxx-ref in="cxx" to="rand.dist.uni.int"></cxx-ref>) invoked with the
Expand Down
2 changes: 1 addition & 1 deletion optional.html
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ <h1>Observers</h1>
<cxx-signature>constexpr T&amp;&amp; operator*() &amp;&amp;;</cxx-signature>
<cxx-signature>constexpr const T&amp;&amp; operator*() const &amp;&amp;;</cxx-signature>

<cxx-requires><code>*this</code> contains a value</cxx-requires>
<cxx-requires><code>*this</code> contains a value.</cxx-requires>
<cxx-effects>Equivalent to <code>return std::move(*<var>val</var>);</code></cxx-effects>
</cxx-function>

Expand Down
12 changes: 6 additions & 6 deletions string.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ <h1><code>basic_string_view</code> iterator support</h1>
<cxx-signature>constexpr const_iterator end() const noexcept;</cxx-signature>
<cxx-signature>constexpr const_iterator cend() const noexcept;</cxx-signature>

<cxx-returns> <code>begin() + size()</code></cxx-returns>
<cxx-returns> <code>begin() + size()</code>.</cxx-returns>
</cxx-function>

<cxx-function>
Expand All @@ -291,7 +291,7 @@ <h1><code>basic_string_view</code> capacity</h1>

<cxx-function>
<cxx-signature>constexpr size_type size() const noexcept;</cxx-signature>
<cxx-returns><code>size_</code></cxx-returns>
<cxx-returns><code>size_</code>.</cxx-returns>
</cxx-function>

<cxx-function>
Expand All @@ -317,7 +317,7 @@ <h1><code>basic_string_view</code> element access</h1>
<cxx-signature>constexpr const_reference operator[](size_type pos) const;</cxx-signature>

<cxx-requires><code>pos &lt; size()</code>.</cxx-requires>
<cxx-returns><code>data_[pos]</code></cxx-returns>
<cxx-returns><code>data_[pos]</code>.</cxx-returns>
<cxx-throws>Nothing.</cxx-throws>
<p><cxx-note>Unlike <code>basic_string::operator[]</code>,
<code>basic_string_view::operator[](size())</code> has undefined behavior instead of returning <code>charT()</code>.</cxx-note></p>
Expand Down Expand Up @@ -349,7 +349,7 @@ <h1><code>basic_string_view</code> element access</h1>
<cxx-function>
<cxx-signature>constexpr const_pointer data() const noexcept;</cxx-signature>

<cxx-returns><code>data_</code></cxx-returns>
<cxx-returns><code>data_</code>.</cxx-returns>
<p><cxx-note>Unlike <code>basic_string::data()</code> and string literals,
<code>data()</code> may return a pointer to a buffer that is not null-terminated.
Therefore it is typically a mistake to pass <code>data()</code> to a routine that takes just a <code>const charT*</code> and expects a null-terminated string.</cxx-note></p>
Expand All @@ -362,14 +362,14 @@ <h1><code>basic_string_view</code> modifiers</h1>
<cxx-function>
<cxx-signature>constexpr void remove_prefix(size_type n);</cxx-signature>

<cxx-requires><code>n &lt;= size()</code></cxx-requires>
<cxx-requires><code>n &lt;= size()</code>.</cxx-requires>
<cxx-effects>Equivalent to <code>data_ += n; size_ -= n;</code></cxx-effects>
</cxx-function>

<cxx-function>
<cxx-signature>constexpr void remove_suffix(size_type n);</cxx-signature>

<cxx-requires><code>n &lt;= size()</code></cxx-requires>
<cxx-requires><code>n &lt;= size()</code>.</cxx-requires>
<cxx-effects>Equivalent to <code>size_ -= n;</code></cxx-effects>
</cxx-function>

Expand Down
2 changes: 1 addition & 1 deletion utilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1>Header <code>&lt;experimental/utility></code> synopsis</h1>
namespace experimental {
inline namespace fundamentals_v2 {

<cxx-ref to="utility.erased.type"></cxx-ref>, erased-type placeholder
<cxx-ref insynopsis="" to="utility.erased.type"></cxx-ref>
struct erased_type { };

} // namespace fundamentals_v2
Expand Down

0 comments on commit b62ea63

Please sign in to comment.