Skip to content

Commit 4021184

Browse files
committed
P2422R1 Remove nodiscard annotations from the standard library specification
*[allocator.traits.other] No such declaration for allocation_result - change not applied. *Second edit for [set.overview] assumed to be intended for [multiset.overview].
1 parent 6d67d20 commit 4021184

File tree

12 files changed

+135
-139
lines changed

12 files changed

+135
-139
lines changed

source/basic.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4017,16 +4017,16 @@
40174017
program.
40184018

40194019
\begin{codeblock}
4020-
[[nodiscard]] void* operator new(std::size_t);
4021-
[[nodiscard]] void* operator new(std::size_t, std::align_val_t);
4020+
void* operator new(std::size_t);
4021+
void* operator new(std::size_t, std::align_val_t);
40224022

40234023
void operator delete(void*) noexcept;
40244024
void operator delete(void*, std::size_t) noexcept;
40254025
void operator delete(void*, std::align_val_t) noexcept;
40264026
void operator delete(void*, std::size_t, std::align_val_t) noexcept;
40274027

4028-
[[nodiscard]] void* operator new[](std::size_t);
4029-
[[nodiscard]] void* operator new[](std::size_t, std::align_val_t);
4028+
void* operator new[](std::size_t);
4029+
void* operator new[](std::size_t, std::align_val_t);
40304030

40314031
void operator delete[](void*) noexcept;
40324032
void operator delete[](void*, std::size_t) noexcept;

source/containers.tex

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@
23012301

23022302
allocator_type get_allocator() const;
23032303
explicit operator bool() const noexcept;
2304-
[[nodiscard]] bool empty() const noexcept;
2304+
bool empty() const noexcept;
23052305

23062306
// \ref{container.node.modifiers}, modifiers
23072307
void swap(@\placeholdernc{node-handle}@&)
@@ -2479,7 +2479,7 @@
24792479
\end{itemdescr}
24802480

24812481
\begin{itemdecl}
2482-
[[nodiscard]] bool empty() const noexcept;
2482+
bool empty() const noexcept;
24832483
\end{itemdecl}
24842484

24852485
\begin{itemdescr}
@@ -6267,7 +6267,7 @@
62676267
constexpr const_reverse_iterator crend() const noexcept;
62686268

62696269
// capacity
6270-
[[nodiscard]] constexpr bool empty() const noexcept;
6270+
constexpr bool empty() const noexcept;
62716271
constexpr size_type size() const noexcept;
62726272
constexpr size_type max_size() const noexcept;
62736273

@@ -6590,7 +6590,7 @@
65906590
const_reverse_iterator crend() const noexcept;
65916591

65926592
// \ref{deque.capacity}, capacity
6593-
[[nodiscard]] bool empty() const noexcept;
6593+
bool empty() const noexcept;
65946594
size_type size() const noexcept;
65956595
size_type max_size() const noexcept;
65966596
void resize(size_type sz);
@@ -7049,7 +7049,7 @@
70497049
const_iterator cend() const noexcept;
70507050

70517051
// capacity
7052-
[[nodiscard]] bool empty() const noexcept;
7052+
bool empty() const noexcept;
70537053
size_type max_size() const noexcept;
70547054

70557055
// \ref{forward.list.access}, element access
@@ -7956,7 +7956,7 @@
79567956
const_reverse_iterator crend() const noexcept;
79577957

79587958
// \ref{list.capacity}, capacity
7959-
[[nodiscard]] bool empty() const noexcept;
7959+
bool empty() const noexcept;
79607960
size_type size() const noexcept;
79617961
size_type max_size() const noexcept;
79627962
void resize(size_type sz);
@@ -8701,7 +8701,7 @@
87018701
constexpr const_reverse_iterator crend() const noexcept;
87028702

87038703
// \ref{vector.capacity}, capacity
8704-
[[nodiscard]] constexpr bool empty() const noexcept;
8704+
constexpr bool empty() const noexcept;
87058705
constexpr size_type size() const noexcept;
87068706
constexpr size_type max_size() const noexcept;
87078707
constexpr size_type capacity() const noexcept;
@@ -9285,7 +9285,7 @@
92859285
constexpr const_reverse_iterator crend() const noexcept;
92869286

92879287
// capacity
9288-
[[nodiscard]] constexpr bool empty() const noexcept;
9288+
constexpr bool empty() const noexcept;
92899289
constexpr size_type size() const noexcept;
92909290
constexpr size_type max_size() const noexcept;
92919291
constexpr size_type capacity() const noexcept;
@@ -9746,7 +9746,7 @@
97469746
const_reverse_iterator crend() const noexcept;
97479747

97489748
// capacity
9749-
[[nodiscard]] bool empty() const noexcept;
9749+
bool empty() const noexcept;
97509750
size_type size() const noexcept;
97519751
size_type max_size() const noexcept;
97529752

@@ -10485,7 +10485,7 @@
1048510485
const_reverse_iterator crend() const noexcept;
1048610486

1048710487
// capacity
10488-
[[nodiscard]] bool empty() const noexcept;
10488+
bool empty() const noexcept;
1048910489
size_type size() const noexcept;
1049010490
size_type max_size() const noexcept;
1049110491

@@ -10825,7 +10825,7 @@
1082510825
const_reverse_iterator crend() const noexcept;
1082610826

1082710827
// capacity
10828-
[[nodiscard]] bool empty() const noexcept;
10828+
bool empty() const noexcept;
1082910829
size_type size() const noexcept;
1083010830
size_type max_size() const noexcept;
1083110831

@@ -11184,7 +11184,7 @@
1118411184
const_reverse_iterator crend() const noexcept;
1118511185

1118611186
// capacity
11187-
[[nodiscard]] bool empty() const noexcept;
11187+
bool empty() const noexcept;
1118811188
size_type size() const noexcept;
1118911189
size_type max_size() const noexcept;
1119011190

@@ -11671,7 +11671,7 @@
1167111671
const_iterator cend() const noexcept;
1167211672

1167311673
// capacity
11674-
[[nodiscard]] bool empty() const noexcept;
11674+
bool empty() const noexcept;
1167511675
size_type size() const noexcept;
1167611676
size_type max_size() const noexcept;
1167711677

@@ -12468,7 +12468,7 @@
1246812468
const_iterator cend() const noexcept;
1246912469

1247012470
// capacity
12471-
[[nodiscard]] bool empty() const noexcept;
12471+
bool empty() const noexcept;
1247212472
size_type size() const noexcept;
1247312473
size_type max_size() const noexcept;
1247412474

@@ -12890,7 +12890,7 @@
1289012890
const_iterator cend() const noexcept;
1289112891

1289212892
// capacity
12893-
[[nodiscard]] bool empty() const noexcept;
12893+
bool empty() const noexcept;
1289412894
size_type size() const noexcept;
1289512895
size_type max_size() const noexcept;
1289612896

@@ -13313,7 +13313,7 @@
1331313313
const_iterator cend() const noexcept;
1331413314

1331513315
// capacity
13316-
[[nodiscard]] bool empty() const noexcept;
13316+
bool empty() const noexcept;
1331713317
size_type size() const noexcept;
1331813318
size_type max_size() const noexcept;
1331913319

@@ -13885,7 +13885,7 @@
1388513885
template<@\exposconcept{container-compatible-range}@<T> R, class Alloc>
1388613886
queue(from_range_t, R&& rg, const Alloc&);
1388713887

13888-
[[nodiscard]] bool empty() const { return c.empty(); }
13888+
bool empty() const { return c.empty(); }
1388913889
size_type size() const { return c.size(); }
1389013890
reference front() { return c.front(); }
1389113891
const_reference front() const { return c.front(); }
@@ -14269,9 +14269,9 @@
1426914269
template<@\exposconcept{container-compatible-range}@<T> R, class Alloc>
1427014270
priority_queue(from_range_t, R&& rg, const Alloc&);
1427114271

14272-
[[nodiscard]] bool empty() const { return c.empty(); }
14273-
size_type size() const { return c.size(); }
14274-
const_reference top() const { return c.front(); }
14272+
bool empty() const { return c.empty(); }
14273+
size_type size() const { return c.size(); }
14274+
const_reference top() const { return c.front(); }
1427514275
void push(const value_type& x);
1427614276
void push(value_type&& x);
1427714277
template<@\exposconcept{container-compatible-range}@<T> R>
@@ -14753,10 +14753,10 @@
1475314753
template<@\exposconcept{container-compatible-range}@<T> R, class Alloc>
1475414754
stack(from_range_t, R&& rg, const Alloc&);
1475514755

14756-
[[nodiscard]] bool empty() const { return c.empty(); }
14757-
size_type size() const { return c.size(); }
14756+
bool empty() const { return c.empty(); }
14757+
size_type size() const { return c.size(); }
1475814758
reference top() { return c.back(); }
14759-
const_reference top() const { return c.back(); }
14759+
const_reference top() const { return c.back(); }
1476014760
void push(const value_type& x) { c.push_back(x); }
1476114761
void push(value_type&& x) { c.push_back(std::move(x)); }
1476214762
template<@\exposconcept{container-compatible-range}@<T> R>
@@ -18312,7 +18312,7 @@
1831218312
// \ref{span.obs}, observers
1831318313
constexpr size_type size() const noexcept;
1831418314
constexpr size_type size_bytes() const noexcept;
18315-
[[nodiscard]] constexpr bool empty() const noexcept;
18315+
constexpr bool empty() const noexcept;
1831618316

1831718317
// \ref{span.elem}, element access
1831818318
constexpr reference operator[](size_type idx) const;
@@ -18811,7 +18811,7 @@
1881118811

1881218812
\indexlibrarymember{span}{empty}%
1881318813
\begin{itemdecl}
18814-
[[nodiscard]] constexpr bool empty() const noexcept;
18814+
constexpr bool empty() const noexcept;
1881518815
\end{itemdecl}
1881618816

1881718817
\begin{itemdescr}

source/diagnostics.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,7 +2009,7 @@
20092009
const_reverse_iterator crbegin() const noexcept;
20102010
const_reverse_iterator crend() const noexcept;
20112011

2012-
[[nodiscard]] bool empty() const noexcept;
2012+
bool empty() const noexcept;
20132013
size_type size() const noexcept;
20142014
size_type max_size() const noexcept;
20152015

@@ -2253,7 +2253,7 @@
22532253

22542254
\indexlibrarymember{empty}{basic_stacktrace}%
22552255
\begin{itemdecl}
2256-
[[nodiscard]] bool empty() const noexcept;
2256+
bool empty() const noexcept;
22572257
\end{itemdecl}
22582258

22592259
\begin{itemdescr}

source/iostreams.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13747,7 +13747,7 @@
1374713747
path extension() const;
1374813748

1374913749
// \ref{fs.path.query}, query
13750-
[[nodiscard]] bool empty() const noexcept;
13750+
bool empty() const noexcept;
1375113751
bool has_root_name() const;
1375213752
bool has_root_directory() const;
1375313753
bool has_root_path() const;
@@ -14993,7 +14993,7 @@
1499314993

1499414994
\indexlibrarymember{empty}{path}%
1499514995
\begin{itemdecl}
14996-
[[nodiscard]] bool empty() const noexcept;
14996+
bool empty() const noexcept;
1499714997
\end{itemdecl}
1499814998

1499914999
\begin{itemdescr}

source/iterators.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,11 @@
503503
template<class T, ptrdiff_t N> constexpr ptrdiff_t
504504
ssize(const T (&array)[N]) noexcept; // freestanding
505505

506-
template<class C> [[nodiscard]] constexpr auto
506+
template<class C> constexpr auto
507507
empty(const C& c) -> decltype(c.empty()); // freestanding
508-
template<class T, size_t N> [[nodiscard]] constexpr bool
508+
template<class T, size_t N> constexpr bool
509509
empty(const T (&array)[N]) noexcept; // freestanding
510-
template<class E> [[nodiscard]] constexpr bool
510+
template<class E> constexpr bool
511511
empty(initializer_list<E> il) noexcept; // freestanding
512512

513513
template<class C> constexpr auto data(C& c) -> decltype(c.data()); // freestanding
@@ -7461,7 +7461,7 @@
74617461

74627462
\indexlibrary{\idxcode{empty(C\& c)}}%
74637463
\begin{itemdecl}
7464-
template<class C> [[nodiscard]] constexpr auto empty(const C& c) -> decltype(c.empty());
7464+
template<class C> constexpr auto empty(const C& c) -> decltype(c.empty());
74657465
\end{itemdecl}
74667466
\begin{itemdescr}
74677467
\pnum
@@ -7471,7 +7471,7 @@
74717471

74727472
\indexlibrary{\idxcode{empty(T (\&array)[N])}}%
74737473
\begin{itemdecl}
7474-
template<class T, size_t N> [[nodiscard]] constexpr bool empty(const T (&array)[N]) noexcept;
7474+
template<class T, size_t N> constexpr bool empty(const T (&array)[N]) noexcept;
74757475
\end{itemdecl}
74767476
\begin{itemdescr}
74777477
\pnum
@@ -7481,7 +7481,7 @@
74817481

74827482
\indexlibrary{\idxcode{empty(initializer_list<E>)}}%
74837483
\begin{itemdecl}
7484-
template<class E> [[nodiscard]] constexpr bool empty(initializer_list<E> il) noexcept;
7484+
template<class E> constexpr bool empty(initializer_list<E> il) noexcept;
74857485
\end{itemdecl}
74867486
\begin{itemdescr}
74877487
\pnum

0 commit comments

Comments
 (0)