Skip to content

Commit 3a5eb40

Browse files
[container.node] Exposition-only formatting for node handle members
Also changes `container_node_type` and `ator_traits` to _`container-node-type`_ and _`ator-traits`_ respectively. And adds missed "is `true`".
1 parent ff706ad commit 3a5eb40

File tree

1 file changed

+44
-43
lines changed

1 file changed

+44
-43
lines changed

source/containers.tex

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,16 +2378,16 @@
23782378
using allocator_type = @\seebelownc{}@;
23792379

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

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

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

@@ -2405,8 +2405,8 @@
24052405

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

24112411
friend constexpr void swap(@\placeholdernc{node-handle}@& x, @\placeholdernc{node-handle}@& y) noexcept(noexcept(x.swap(y))) {
24122412
x.swap(y);
@@ -2424,9 +2424,9 @@
24242424
\pnum
24252425
\effects
24262426
Constructs a \exposid{node-handle} object initializing
2427-
\tcode{ptr_} with \tcode{nh.ptr_}. Move constructs \tcode{alloc_} with
2428-
\tcode{nh.alloc_}. Assigns \keyword{nullptr} to \tcode{nh.ptr_} and assigns
2429-
\tcode{nullopt} to \tcode{nh.alloc_}.
2427+
\exposid{ptr_} with \tcode{nh.\exposid{ptr_}}. Move constructs \exposid{alloc_} with
2428+
\tcode{nh.\exposid{alloc_}}. Assigns \keyword{nullptr} to \tcode{nh.\exposid{ptr_}} and assigns
2429+
\tcode{nullopt} to \tcode{nh.\exposid{alloc_}}.
24302430
\end{itemdescr}
24312431

24322432
\begin{itemdecl}
@@ -2436,28 +2436,29 @@
24362436
\begin{itemdescr}
24372437
\pnum
24382438
\expects
2439-
Either \tcode{!alloc_}, or
2440-
\tcode{ator_traits::propagate_on_container_move_assignment::\-value}
2441-
is \tcode{true}, or \tcode{alloc_ == nh.alloc_}.
2439+
Either \tcode{!\exposid{alloc_}} is \tcode{true}, or \linebreak
2440+
\tcode{\exposid{ator-traits}::propagate_on_container_move_assignment::value}
2441+
is \tcode{true}, or \tcode{\exposid{alloc_}\brk{} == nh.\exposid{alloc_}} is \tcode{true}.
24422442

24432443
\pnum
24442444
\effects
24452445
\begin{itemize}
24462446
\item
2447-
If \tcode{ptr_ != nullptr}, destroys the \tcode{value_type}
2448-
subobject in the \tcode{container_node_type} object pointed to by \tcode{ptr_}
2449-
by calling \tcode{ator_traits::destroy}, then deallocates \tcode{ptr_} by
2450-
calling \tcode{ator_traits::template rebind_traits<container_node_type>::deallocate}.
2447+
If \tcode{\exposid{ptr_} != nullptr} is \tcode{true}, destroys the \tcode{value_type}
2448+
subobject in the \exposid{container-node-type} object pointed to by \exposid{ptr_}
2449+
by calling \tcode{\exposid{ator-traits}::destroy}, then deallocates \exposid{ptr_} by
2450+
calling \tcode{\exposid{ator-\-traits}::template rebind_traits<\exposid{container-node-type}>::deallocate}.
24512451
\item
2452-
Assigns \tcode{nh.ptr_} to \tcode{ptr_}.
2452+
Assigns \tcode{nh.\exposid{ptr_}} to \exposid{ptr_}.
24532453
\item
2454-
If \tcode{!alloc\textunderscore} or \tcode{ator_traits::propagate_on_container_move_assignment::value}
2454+
If \tcode{!\exposid{alloc_}} is \tcode{true} or
2455+
\tcode{\exposid{ator-traits}::propagate_on_container_move_assignment::value}
24552456
is \tcode{true}, \linebreak
2456-
move assigns \tcode{nh.alloc_} to \tcode{alloc_}.
2457+
move assigns \tcode{nh.\exposid{alloc_}} to \exposid{alloc_}.
24572458
\item
24582459
Assigns
2459-
\keyword{nullptr} to \tcode{nh.ptr_} and assigns \tcode{nullopt} to
2460-
\tcode{nh.alloc_}.
2460+
\keyword{nullptr} to \tcode{nh.\exposid{ptr_}} and assigns \tcode{nullopt} to
2461+
\tcode{nh.\exposid{alloc_}}.
24612462
\end{itemize}
24622463

24632464
\pnum
@@ -2478,10 +2479,10 @@
24782479
\begin{itemdescr}
24792480
\pnum
24802481
\effects
2481-
If \tcode{ptr_ != nullptr}, destroys the \tcode{value_type} subobject
2482-
in the \tcode{container_node_type} object pointed to by \tcode{ptr_} by calling
2483-
\tcode{ator_traits::destroy}, then deallocates \tcode{ptr_} by calling
2484-
\tcode{ator_traits::template rebind_traits<container_node_type>::deallocate}.
2482+
If \tcode{\exposid{ptr_} != nullptr} is \tcode{true}, destroys the \tcode{value_type} subobject
2483+
in the \exposid{container-node-type} object pointed to by \exposid{ptr_} by calling
2484+
\tcode{\exposid{ator-traits}::destroy}, then deallocates \exposid{ptr_} by calling
2485+
\tcode{\exposid{ator-\-traits}::template rebind_traits<\exposid{container-node-type}>::deallocate}.
24852486
\end{itemdescr}
24862487

24872488
\rSec3[container.node.observers]{Observers}
@@ -2498,7 +2499,7 @@
24982499
\pnum
24992500
\returns
25002501
A reference to the \tcode{value_type} subobject in the
2501-
\tcode{container_node_type} object pointed to by \tcode{ptr_}.
2502+
\exposid{container-node-type} object pointed to by \exposid{ptr_}.
25022503

25032504
\pnum
25042505
\throws
@@ -2517,8 +2518,8 @@
25172518
\pnum
25182519
\returns
25192520
A non-const reference to the \tcode{key_type} member of the
2520-
\tcode{value_type} subobject in the \tcode{contain\-er_node_type} object
2521-
pointed to by \tcode{ptr_}.
2521+
\tcode{value_type} subobject in the \exposid{contain\-er-node-type} object
2522+
pointed to by \exposid{ptr_}.
25222523

25232524
\pnum
25242525
\throws
@@ -2541,8 +2542,8 @@
25412542
\pnum
25422543
\returns
25432544
A reference to the \tcode{mapped_type} member of the
2544-
\tcode{value_type} subobject in the \tcode{container_node_type} object
2545-
pointed to by \tcode{ptr_}.
2545+
\tcode{value_type} subobject in the \exposid{container-\-node-type} object
2546+
pointed to by \exposid{ptr_}.
25462547

25472548
\pnum
25482549
\throws
@@ -2560,7 +2561,7 @@
25602561

25612562
\pnum
25622563
\returns
2563-
\tcode{*alloc_}.
2564+
\tcode{*\exposid{alloc_}}.
25642565

25652566
\pnum
25662567
\throws
@@ -2574,7 +2575,7 @@
25742575
\begin{itemdescr}
25752576
\pnum
25762577
\returns
2577-
\tcode{ptr_ != nullptr}.
2578+
\tcode{\exposid{ptr_} != nullptr}.
25782579
\end{itemdescr}
25792580

25802581
\begin{itemdecl}
@@ -2584,29 +2585,29 @@
25842585
\begin{itemdescr}
25852586
\pnum
25862587
\returns
2587-
\tcode{ptr_ == nullptr}.
2588+
\tcode{\exposid{ptr_} == nullptr}.
25882589
\end{itemdescr}
25892590

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

25922593
\begin{itemdecl}
25932594
constexpr void swap(@\placeholdernc{node-handle}@& nh)
2594-
noexcept(ator_traits::propagate_on_container_swap::value ||
2595-
ator_traits::is_always_equal::value);
2595+
noexcept(@\exposid{ator-traits}@::propagate_on_container_swap::value ||
2596+
@\exposid{ator-traits}@::is_always_equal::value);
25962597
\end{itemdecl}
25972598

25982599
\begin{itemdescr}
25992600
\pnum
26002601
\expects
2601-
\tcode{!alloc_}, or \tcode{!nh.alloc_}, or
2602-
\tcode{ator_traits::propagate_on_container_swap::value} is \tcode{true},
2603-
or \tcode{alloc_ == nh.alloc_}.
2602+
\tcode{!\exposid{alloc_}} is \tcode{true}, or \tcode{!nh.\exposid{alloc_}}, or
2603+
\tcode{\exposid{ator-traits}::propagate_on_container_swap::\-value} is \tcode{true},
2604+
or \tcode{\exposid{alloc_} == nh.\exposid{alloc_}} is \tcode{true}.
26042605

26052606
\pnum
26062607
\effects
2607-
Calls \tcode{swap(ptr_, nh.ptr_)}. If \tcode{!alloc_}, or
2608-
\tcode{!nh.alloc_}, or \tcode{ator_traits::propagate_on_container_swap::value}
2609-
is \tcode{true} calls \tcode{swap(alloc_, nh.alloc_)}.
2608+
Calls \tcode{swap(\exposid{ptr_}, nh.\exposid{ptr_})}. If \tcode{!\exposid{alloc_}} is \tcode{true}, or
2609+
\tcode{!nh.\exposid{alloc_}} is \tcode{true}, or \tcode{\exposid{ator-traits}::\-propagate_on_container_swap::value}
2610+
is \tcode{true} calls \tcode{swap(\exposid{alloc_}, nh.\exposid{alloc_})}.
26102611
\end{itemdescr}
26112612

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

0 commit comments

Comments
 (0)