Skip to content

Commit a457442

Browse files
burblebeetkoeppe
authored andcommitted
LWG3948 possibly-const-range and as-const-pointer should be noexcept
1 parent a4a9db9 commit a457442

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/ranges.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@
393393

394394
// \ref{range.as.const}, as const view
395395
template<@\libconcept{input_range}@ R>
396-
constexpr auto& @\exposid{possibly-const-range}@(R& r) { // \expos
396+
constexpr auto& @\exposid{possibly-const-range}@(R& r) noexcept { // \expos
397397
if constexpr (@\libconcept{constant_range}@<const R> && !@\libconcept{constant_range}@<R>) {
398398
return const_cast<const R&>(r);
399399
} else {
@@ -1184,7 +1184,7 @@
11841184

11851185
\begin{codeblock}
11861186
template<class T>
1187-
constexpr auto @\exposid{as-const-pointer}@(const T* p) { return p; } // \expos
1187+
constexpr auto @\exposid{as-const-pointer}@(const T* p) noexcept { return p; } // \expos
11881188
\end{codeblock}
11891189

11901190
\pnum

0 commit comments

Comments
 (0)