Skip to content

Commit 44e46e6

Browse files
jensmaurertkoeppe
authored andcommitted
[lib] Remove 'std::' prefix from library names. (#1085)
The standard library specifies that references to its names are assumed to be prefixed by '::std::'. Therefore, we can remove any explicit 'std::' prefixes. [iterator.range] was not touched, because it is unclear whether argument-dependent lookup was intended to be disabled here. Fixes #431.
1 parent aff2b2a commit 44e46e6

File tree

9 files changed

+142
-142
lines changed

9 files changed

+142
-142
lines changed

source/algorithms.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,11 +1274,11 @@
12741274
permitted to execute in either the invoking thread of execution or in a
12751275
thread of execution implicitly
12761276
created by the library to support parallel algorithm execution.
1277-
If the threads of execution created by \tcode{std::thread} provide concurrent
1277+
If the threads of execution created by \tcode{thread}~(\ref{thread.thread.class}) provide concurrent
12781278
forward progress guarantees~(\ref{intro.progress}), then a thread of execution
12791279
implicitly created by the library will provide parallel forward progress guarantees;
12801280
otherwise, the provided forward progress guarantee is
1281-
\impldef{forward progress guarantees for implicit threads of parallel algorithms (if not defined for \tcode{std::thread})}.
1281+
\impldef{forward progress guarantees for implicit threads of parallel algorithms (if not defined for \tcode{thread})}.
12821282
Any such
12831283
invocations executing in the same thread of execution are indeterminately sequenced with
12841284
respect to each other.

source/atomics.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@
816816
\item a \textit{C} refers to its corresponding non-atomic type.
817817
\item an \textit{M} refers to type of the other argument for arithmetic operations. For
818818
integral atomic types, \textit{M} is \textit{C}. For atomic address types, \textit{M} is
819-
\tcode{std::ptrdiff_t}.
819+
\tcode{ptrdiff_t}.
820820
\item the non-member functions not ending in \tcode{_explicit} have the semantics of their
821821
corresponding \tcode{_explicit} functions with \tcode{memory_order} arguments of
822822
\tcode{memory_order_seq_cst}.

source/containers.tex

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@
528528
and an rvalue \tcode{rv} of type \tcode{T},
529529
the following terms are defined. If \tcode{X}
530530
is not allocator-aware, the terms below are defined as if \tcode{A} were
531-
\tcode{std::allocator<T>} --- no allocator object needs to be created
532-
and user specializations of \tcode{std::allocator<T>} are not instantiated:
531+
\tcode{allocator<T>} --- no allocator object needs to be created
532+
and user specializations of \tcode{allocator<T>} are not instantiated:
533533

534534
\begin{itemize}
535535
\item
@@ -596,7 +596,7 @@
596596
A container calls \tcode{allocator_traits<A>::construct(m, p, args)}
597597
to construct an element at \tcode{p} using \tcode{args},
598598
with \tcode{m == get_allocator()}.
599-
The default \tcode{construct} in \tcode{std::allocator} will
599+
The default \tcode{construct} in \tcode{allocator} will
600600
call \tcode{::new((void*)p) T(args)},
601601
but specialized allocators may choose a different definition.
602602
\end{note}
@@ -765,7 +765,7 @@
765765
\tcode{A} denotes \tcode{X::allocator_type} if
766766
the \grammarterm{qualified-id} \tcode{X::allocator_type} is valid and denotes a
767767
type~(\ref{temp.deduct}) and
768-
\tcode{std::allocator<T>} if it doesn't,
768+
\tcode{allocator<T>} if it doesn't,
769769
\tcode{i} and \tcode{j}
770770
denote iterators satisfying input iterator requirements
771771
and refer to elements implicitly convertible to \tcode{value_type},
@@ -1222,7 +1222,7 @@
12221222
this name.
12231223

12241224
\pnum
1225-
If a user-defined specialization of \tcode{std::pair} exists for
1225+
If a user-defined specialization of \tcode{pair} exists for
12261226
\tcode{pair<const Key, T>} or \tcode{pair<Key, T>}, where \tcode{Key} is the
12271227
container's \tcode{key_type} and \tcode{T} is the container's
12281228
\tcode{mapped_type}, the behavior of operations involving node handles is
@@ -1579,7 +1579,7 @@
15791579
\tcode{ke} is a value such that \tcode{a} is partitioned with respect to
15801580
\tcode{c(r, ke)} and \tcode{!c(ke, r)}, with \tcode{c(r, ke)} implying
15811581
\tcode{!c(ke, r)}.
1582-
\tcode{A} denotes the storage allocator used by \tcode{X}, if any, or \tcode{std::allocator<X::value_type>} otherwise,
1582+
\tcode{A} denotes the storage allocator used by \tcode{X}, if any, or \tcode{allocator<X::value_type>} otherwise,
15831583
\tcode{m} denotes an allocator of a type convertible to \tcode{A},
15841584
and \tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}.
15851585

@@ -2112,7 +2112,7 @@
21122112
\pnum
21132113
For \tcode{unordered_set} and \tcode{unordered_multiset} the value type is
21142114
the same as the key type. For \tcode{unordered_map} and
2115-
\tcode{unordered_multimap} it is \tcode{std::pair<const Key,
2115+
\tcode{unordered_multimap} it is \tcode{pair<const Key,
21162116
T>}.
21172117

21182118
\pnum
@@ -2218,7 +2218,7 @@
22182218
\tcode{X::hasher}
22192219
& \tcode{Hash}
22202220
& \tcode{Hash} shall be a unary function object type such that the expression
2221-
\tcode{hf(k)} has type \tcode{std::size_t}.%
2221+
\tcode{hf(k)} has type \tcode{size_t}.%
22222222
\indextext{unordered associative containers!\idxcode{hasher}}%
22232223
\indextext{\idxcode{hasher}!unordered associative containers}%
22242224
& compile time
@@ -6266,7 +6266,7 @@
62666266
\pnum
62676267
\remarks
62686268
These signatures shall not participate in overload resolution
6269-
unless \tcode{std::is_constructible_v<value_type, P\&\&>} is
6269+
unless \tcode{is_constructible_v<value_type, P\&\&>} is
62706270
\tcode{true}.
62716271
\end{itemdescr}
62726272

@@ -6722,7 +6722,7 @@
67226722
\pnum
67236723
\remarks
67246724
These signatures shall not participate in overload resolution
6725-
unless \tcode{std::is_constructible_v<value_type, P\&\&>} is
6725+
unless \tcode{is_constructible_v<value_type, P\&\&>} is
67266726
\tcode{true}.
67276727
\end{itemdescr}
67286728

@@ -7300,16 +7300,16 @@
73007300
template <class Key,
73017301
class T,
73027302
class Hash = hash<Key>,
7303-
class Pred = std::equal_to<Key>,
7304-
class Alloc = std::allocator<std::pair<const Key, T>>>
7303+
class Pred = equal_to<Key>,
7304+
class Alloc = allocator<pair<const Key, T>>>
73057305
class unordered_map;
73067306

73077307
// \ref{unord.multimap}, class template unordered_multimap
73087308
template <class Key,
73097309
class T,
73107310
class Hash = hash<Key>,
7311-
class Pred = std::equal_to<Key>,
7312-
class Alloc = std::allocator<std::pair<const Key, T>>>
7311+
class Pred = equal_to<Key>,
7312+
class Alloc = allocator<pair<const Key, T>>>
73137313
class unordered_multimap;
73147314

73157315
template <class Key, class T, class Hash, class Pred, class Alloc>
@@ -7366,15 +7366,15 @@
73667366
// \ref{unord.set}, class template unordered_set
73677367
template <class Key,
73687368
class Hash = hash<Key>,
7369-
class Pred = std::equal_to<Key>,
7370-
class Alloc = std::allocator<Key>>
7369+
class Pred = equal_to<Key>,
7370+
class Alloc = allocator<Key>>
73717371
class unordered_set;
73727372

73737373
// \ref{unord.multiset}, class template unordered_multiset
73747374
template <class Key,
73757375
class Hash = hash<Key>,
7376-
class Pred = std::equal_to<Key>,
7377-
class Alloc = std::allocator<Key>>
7376+
class Pred = equal_to<Key>,
7377+
class Alloc = allocator<Key>>
73787378
class unordered_multiset;
73797379

73807380
template <class Key, class Hash, class Pred, class Alloc>
@@ -7432,7 +7432,7 @@
74327432
supports forward iterators.
74337433

74347434
\pnum
7435-
An \tcode{unordered_map} satisfies all of the requirements of a container, of an unordered associative container, and of an allocator-aware container (Table~\ref{tab:containers.allocatoraware}). It provides the operations described in the preceding requirements table for unique keys; that is, an \tcode{unordered_map} supports the \tcode{a_uniq} operations in that table, not the \tcode{a_eq} operations. For an \tcode{unordered_map<Key, T>} the \tcode{key type} is \tcode{Key}, the mapped type is \tcode{T}, and the value type is \tcode{std::pair<const Key, T>}.
7435+
An \tcode{unordered_map} satisfies all of the requirements of a container, of an unordered associative container, and of an allocator-aware container (Table~\ref{tab:containers.allocatoraware}). It provides the operations described in the preceding requirements table for unique keys; that is, an \tcode{unordered_map} supports the \tcode{a_uniq} operations in that table, not the \tcode{a_eq} operations. For an \tcode{unordered_map<Key, T>} the \tcode{key type} is \tcode{Key}, the mapped type is \tcode{T}, and the value type is \tcode{pair<const Key, T>}.
74367436

74377437
\pnum
74387438
This section only describes operations on \tcode{unordered_map} that
@@ -7445,8 +7445,8 @@
74457445
template <class Key,
74467446
class T,
74477447
class Hash = hash<Key>,
7448-
class Pred = std::equal_to<Key>,
7449-
class Allocator = std::allocator<std::pair<const Key, T>>>
7448+
class Pred = equal_to<Key>,
7449+
class Allocator = allocator<pair<const Key, T>>>
74507450
class unordered_map {
74517451
public:
74527452
// types:
@@ -7591,8 +7591,8 @@
75917591
iterator find(const key_type& k);
75927592
const_iterator find(const key_type& k) const;
75937593
size_type count(const key_type& k) const;
7594-
std::pair<iterator, iterator> equal_range(const key_type& k);
7595-
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
7594+
pair<iterator, iterator> equal_range(const key_type& k);
7595+
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
75967596

75977597
// \ref{unord.map.elem}, element access
75987598
mapped_type& operator[](const key_type& k);
@@ -7743,7 +7743,7 @@
77437743

77447744
\pnum
77457745
\remarks This signature shall not participate in overload resolution
7746-
unless \tcode{std::is_constructible_v<value_type, P\&\&>} is \tcode{true}.
7746+
unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}.
77477747
\end{itemdescr}
77487748

77497749
\indexlibrarymember{unordered_map}{insert}%
@@ -7759,7 +7759,7 @@
77597759

77607760
\pnum
77617761
\remarks This signature shall not participate in overload resolution
7762-
unless \tcode{std::is_constructible_v<value_type, P\&\&>} is \tcode{true}.
7762+
unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}.
77637763
\end{itemdescr}
77647764

77657765
\indexlibrarymember{try_emplace}{unordered_map}%
@@ -7940,7 +7940,7 @@
79407940
preceding requirements table for equivalent keys; that is, an \tcode{unordered_multimap}
79417941
supports the \tcode{a_eq} operations in that table, not the \tcode{a_uniq} operations.
79427942
For an \tcode{unordered_multimap<Key, T>} the \tcode{key type} is \tcode{Key}, the
7943-
mapped type is \tcode{T}, and the value type is \tcode{std::pair<const Key, T>}.
7943+
mapped type is \tcode{T}, and the value type is \tcode{pair<const Key, T>}.
79447944

79457945
\pnum
79467946
This section only describes operations on \tcode{unordered_multimap}
@@ -7953,8 +7953,8 @@
79537953
template <class Key,
79547954
class T,
79557955
class Hash = hash<Key>,
7956-
class Pred = std::equal_to<Key>,
7957-
class Allocator = std::allocator<std::pair<const Key, T>>>
7956+
class Pred = equal_to<Key>,
7957+
class Allocator = allocator<pair<const Key, T>>>
79587958
class unordered_multimap {
79597959
public:
79607960
// types:
@@ -8081,8 +8081,8 @@
80818081
iterator find(const key_type& k);
80828082
const_iterator find(const key_type& k) const;
80838083
size_type count(const key_type& k) const;
8084-
std::pair<iterator, iterator> equal_range(const key_type& k);
8085-
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
8084+
pair<iterator, iterator> equal_range(const key_type& k);
8085+
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
80868086

80878087
// bucket interface:
80888088
size_type bucket_count() const noexcept;
@@ -8189,7 +8189,7 @@
81898189

81908190
\pnum
81918191
\remarks This signature shall not participate in overload resolution
8192-
unless \tcode{std::is_constructible_v<value_type, P\&\&>} is \tcode{true}.
8192+
unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}.
81938193
\end{itemdescr}
81948194

81958195
\indexlibrarymember{unordered_multimap}{insert}%
@@ -8205,7 +8205,7 @@
82058205

82068206
\pnum
82078207
\remarks This signature shall not participate in overload resolution
8208-
unless \tcode{std::is_constructible_v<value_type, P\&\&>} is \tcode{true}.
8208+
unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}.
82098209
\end{itemdescr}
82108210

82118211
\rSec3[unord.multimap.swap]{\tcode{unordered_multimap} swap}
@@ -8251,8 +8251,8 @@
82518251
namespace std {
82528252
template <class Key,
82538253
class Hash = hash<Key>,
8254-
class Pred = std::equal_to<Key>,
8255-
class Allocator = std::allocator<Key>>
8254+
class Pred = equal_to<Key>,
8255+
class Allocator = allocator<Key>>
82568256
class unordered_set {
82578257
public:
82588258
// types:
@@ -8377,8 +8377,8 @@
83778377
iterator find(const key_type& k);
83788378
const_iterator find(const key_type& k) const;
83798379
size_type count(const key_type& k) const;
8380-
std::pair<iterator, iterator> equal_range(const key_type& k);
8381-
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
8380+
pair<iterator, iterator> equal_range(const key_type& k);
8381+
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
83828382

83838383
// bucket interface:
83848384
size_type bucket_count() const noexcept;
@@ -8519,8 +8519,8 @@
85198519
namespace std {
85208520
template <class Key,
85218521
class Hash = hash<Key>,
8522-
class Pred = std::equal_to<Key>,
8523-
class Allocator = std::allocator<Key>>
8522+
class Pred = equal_to<Key>,
8523+
class Allocator = allocator<Key>>
85248524
class unordered_multiset {
85258525
public:
85268526
// types:
@@ -8644,8 +8644,8 @@
86448644
iterator find(const key_type& k);
86458645
const_iterator find(const key_type& k) const;
86468646
size_type count(const key_type& k) const;
8647-
std::pair<iterator, iterator> equal_range(const key_type& k);
8648-
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
8647+
pair<iterator, iterator> equal_range(const key_type& k);
8648+
pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
86498649

86508650
// bucket interface:
86518651
size_type bucket_count() const noexcept;

source/iostreams.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6531,9 +6531,9 @@
65316531
and the second is of type
65326532
\tcode{const char*},
65336533
\item
6534-
\tcode{std::char_traits<char>::length(s)}
6534+
\tcode{char_traits<char>::length(s)}
65356535
for the overload where the first argument is of type
6536-
\tcode{basic_ostream<\brk{}charT, traits>\&}
6536+
\tcode{basic_ostream<charT, traits>\&}
65376537
and the second is of type
65386538
\tcode{const char*},
65396539
\item
@@ -8714,7 +8714,7 @@
87148714
It then opens a file, if possible, whose name is the
87158715
\ntbs \tcode{s}
87168716
(as if by calling
8717-
\tcode{std::fopen(s, modstr)}).
8717+
\tcode{fopen(s, modstr)}).
87188718
\indextext{NTBS}%
87198719
\indexlibrary{\idxcode{fopen}}%
87208720
The \ntbs \tcode{modstr} is determined from
@@ -8753,7 +8753,7 @@
87538753
\tcode{(mode \& ios_base::ate) != 0},
87548754
positions the file to the end
87558755
(as if by calling
8756-
\tcode{std::fseek(file, 0, SEEK_END)}).\footnote{The macro
8756+
\tcode{fseek(file, 0, SEEK_END)}).\footnote{The macro
87578757
\tcode{SEEK_END}
87588758
is defined, and the function signatures
87598759
\indexlibrary{\idxcode{fopen}}%
@@ -9089,9 +9089,9 @@
90899089
Next, seek to the new position: if
90909090
\tcode{width > 0},
90919091
call
9092-
\tcode{std::fseek(file, width * off, whence)},
9092+
\tcode{fseek(file, width * off, whence)},
90939093
otherwise call
9094-
\tcode{std::fseek(file, 0, whence)}.
9094+
\tcode{fseek(file, 0, whence)}.
90959095

90969096
\pnum
90979097
\remarks

source/lib-intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,7 @@
21212121
fail. The allocator also may silently ignore the requested alignment.
21222122
\begin{note} Additionally, the member function \tcode{allocate}
21232123
for that type may fail by throwing an object of type
2124-
\tcode{std::bad_alloc}.\end{note}
2124+
\tcode{bad_alloc}.\end{note}
21252125

21262126
\rSec4[allocator.requirements.completeness]{Allocator completeness requirements}
21272127

0 commit comments

Comments
 (0)