Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 44 additions & 43 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2378,16 +2378,16 @@
using allocator_type = @\seebelownc{}@;

private:
using container_node_type = @\unspecnc@; // \expos
using ator_traits = allocator_traits<allocator_type>; // \expos
using @\exposid{container-node-type}@ = @\unspecnc@; // \expos
using @\exposid{ator-traits}@ = allocator_traits<allocator_type>; // \expos

typename ator_traits::template
rebind_traits<container_node_type>::pointer ptr_; // \expos
optional<allocator_type> alloc_; // \expos
typename @\exposid{ator-traits}@::template
rebind_traits<@\exposid{container-node-type}@>::pointer @\exposid{ptr_}@; // \expos
optional<allocator_type> @\exposid{alloc_}@; // \expos

public:
// \ref{container.node.cons}, constructors, copy, and assignment
constexpr @\placeholdernc{node-handle}@() noexcept : ptr_(), alloc_() {}
constexpr @\placeholdernc{node-handle}@() noexcept : @\exposid{ptr_}@(), @\exposid{alloc_}@() {}
constexpr @\placeholdernc{node-handle}@(@\placeholdernc{node-handle}@&&) noexcept;
constexpr @\placeholdernc{node-handle}@& operator=(@\placeholdernc{node-handle}@&&);

Expand All @@ -2405,8 +2405,8 @@

// \ref{container.node.modifiers}, modifiers
constexpr void swap(@\placeholdernc{node-handle}@&)
noexcept(ator_traits::propagate_on_container_swap::value ||
ator_traits::is_always_equal::value);
noexcept(@\exposid{ator-traits}@::propagate_on_container_swap::value ||
@\exposid{ator-traits}@::is_always_equal::value);

friend constexpr void swap(@\placeholdernc{node-handle}@& x, @\placeholdernc{node-handle}@& y) noexcept(noexcept(x.swap(y))) {
x.swap(y);
Expand All @@ -2424,9 +2424,9 @@
\pnum
\effects
Constructs a \exposid{node-handle} object initializing
\tcode{ptr_} with \tcode{nh.ptr_}. Move constructs \tcode{alloc_} with
\tcode{nh.alloc_}. Assigns \keyword{nullptr} to \tcode{nh.ptr_} and assigns
\tcode{nullopt} to \tcode{nh.alloc_}.
\exposid{ptr_} with \tcode{nh.\exposid{ptr_}}. Move constructs \exposid{alloc_} with
\tcode{nh.\exposid{alloc_}}. Assigns \keyword{nullptr} to \tcode{nh.\exposid{ptr_}} and assigns
\tcode{nullopt} to \tcode{nh.\exposid{alloc_}}.
\end{itemdescr}

\begin{itemdecl}
Expand All @@ -2436,28 +2436,29 @@
\begin{itemdescr}
\pnum
\expects
Either \tcode{!alloc_}, or
\tcode{ator_traits::propagate_on_container_move_assignment::\-value}
is \tcode{true}, or \tcode{alloc_ == nh.alloc_}.
Either \tcode{!\exposid{alloc_}} is \tcode{true}, or
\tcode{\exposidnc{ator-traits}::propagate_on_container_move_assign\-ment::value}
is \tcode{true}, or \tcode{\exposid{alloc_} == nh.\exposid{alloc_}} is \tcode{true}.

\pnum
\effects
\begin{itemize}
\item
If \tcode{ptr_ != nullptr}, destroys the \tcode{value_type}
subobject in the \tcode{container_node_type} object pointed to by \tcode{ptr_}
by calling \tcode{ator_traits::destroy}, then deallocates \tcode{ptr_} by
calling \tcode{ator_traits::template rebind_traits<container_node_type>::deallocate}.
If \tcode{\exposid{ptr_} != nullptr} is \tcode{true}, destroys the \tcode{value_type}
subobject in the \exposid{container-node-type} object pointed to by \exposid{ptr_}
by calling \tcode{\exposid{ator-traits}::destroy}, then deallocates \exposid{ptr_} by
calling \tcode{\exposid{ator-\-traits}::template rebind_traits<\exposid{container-node-type}>::deallocate}.
\item
Assigns \tcode{nh.ptr_} to \tcode{ptr_}.
Assigns \tcode{nh.\exposid{ptr_}} to \exposid{ptr_}.
\item
If \tcode{!alloc\textunderscore} or \tcode{ator_traits::propagate_on_container_move_assignment::value}
If \tcode{!\exposid{alloc_}} is \tcode{true} or
\tcode{\exposid{ator-traits}::propagate_on_container_move_assignment::value}
is \tcode{true}, \linebreak
move assigns \tcode{nh.alloc_} to \tcode{alloc_}.
move assigns \tcode{nh.\exposid{alloc_}} to \exposid{alloc_}.
\item
Assigns
\keyword{nullptr} to \tcode{nh.ptr_} and assigns \tcode{nullopt} to
\tcode{nh.alloc_}.
\keyword{nullptr} to \tcode{nh.\exposid{ptr_}} and assigns \tcode{nullopt} to
\tcode{nh.\exposid{alloc_}}.
\end{itemize}

\pnum
Expand All @@ -2478,10 +2479,10 @@
\begin{itemdescr}
\pnum
\effects
If \tcode{ptr_ != nullptr}, destroys the \tcode{value_type} subobject
in the \tcode{container_node_type} object pointed to by \tcode{ptr_} by calling
\tcode{ator_traits::destroy}, then deallocates \tcode{ptr_} by calling
\tcode{ator_traits::template rebind_traits<container_node_type>::deallocate}.
If \tcode{\exposid{ptr_} != nullptr} is \tcode{true}, destroys the \tcode{value_type} subobject
in the \exposid{container-node-type} object pointed to by \exposid{ptr_} by calling
\tcode{\exposid{ator-traits}::destroy}, then deallocates \exposid{ptr_} by calling
\tcode{\exposid{ator-\-traits}::template rebind_traits<\exposid{container-node-type}>::deallocate}.
\end{itemdescr}

\rSec3[container.node.observers]{Observers}
Expand All @@ -2498,7 +2499,7 @@
\pnum
\returns
A reference to the \tcode{value_type} subobject in the
\tcode{container_node_type} object pointed to by \tcode{ptr_}.
\exposid{container-node-type} object pointed to by \exposid{ptr_}.

\pnum
\throws
Expand All @@ -2517,8 +2518,8 @@
\pnum
\returns
A non-const reference to the \tcode{key_type} member of the
\tcode{value_type} subobject in the \tcode{contain\-er_node_type} object
pointed to by \tcode{ptr_}.
\tcode{value_type} subobject in the \exposid{contain\-er-node-type} object
pointed to by \exposid{ptr_}.

\pnum
\throws
Expand All @@ -2541,8 +2542,8 @@
\pnum
\returns
A reference to the \tcode{mapped_type} member of the
\tcode{value_type} subobject in the \tcode{container_node_type} object
pointed to by \tcode{ptr_}.
\tcode{value_type} subobject in the \exposid{container-\-node-type} object
pointed to by \exposid{ptr_}.

\pnum
\throws
Expand All @@ -2560,7 +2561,7 @@

\pnum
\returns
\tcode{*alloc_}.
\tcode{*\exposid{alloc_}}.

\pnum
\throws
Expand All @@ -2574,7 +2575,7 @@
\begin{itemdescr}
\pnum
\returns
\tcode{ptr_ != nullptr}.
\tcode{\exposid{ptr_} != nullptr}.
\end{itemdescr}

\begin{itemdecl}
Expand All @@ -2584,29 +2585,29 @@
\begin{itemdescr}
\pnum
\returns
\tcode{ptr_ == nullptr}.
\tcode{\exposid{ptr_} == nullptr}.
\end{itemdescr}

\rSec3[container.node.modifiers]{Modifiers}

\begin{itemdecl}
constexpr void swap(@\placeholdernc{node-handle}@& nh)
noexcept(ator_traits::propagate_on_container_swap::value ||
ator_traits::is_always_equal::value);
noexcept(@\exposid{ator-traits}@::propagate_on_container_swap::value ||
@\exposid{ator-traits}@::is_always_equal::value);
\end{itemdecl}

\begin{itemdescr}
\pnum
\expects
\tcode{!alloc_}, or \tcode{!nh.alloc_}, or
\tcode{ator_traits::propagate_on_container_swap::value} is \tcode{true},
or \tcode{alloc_ == nh.alloc_}.
\tcode{!\exposid{alloc_}} is \tcode{true}, or \tcode{!nh.\exposid{alloc_}}, or
\tcode{\exposid{ator-traits}::propagate_on_container_swap::\-value} is \tcode{true},
or \tcode{\exposid{alloc_} == nh.\exposid{alloc_}} is \tcode{true}.

\pnum
\effects
Calls \tcode{swap(ptr_, nh.ptr_)}. If \tcode{!alloc_}, or
\tcode{!nh.alloc_}, or \tcode{ator_traits::propagate_on_container_swap::value}
is \tcode{true} calls \tcode{swap(alloc_, nh.alloc_)}.
Calls \tcode{swap(\exposid{ptr_}, nh.\exposid{ptr_})}. If \tcode{!\exposid{alloc_}} is \tcode{true}, or
\tcode{!nh.\exposid{alloc_}} is \tcode{true}, or \tcode{\exposid{ator-traits}::\-propagate_on_container_swap::value}
is \tcode{true} calls \tcode{swap(\exposid{alloc_}, nh.\exposid{alloc_})}.
\end{itemdescr}

\rSec2[container.insert.return]{Insert return type}
Expand Down