Skip to content

Commit 8160812

Browse files
burblebeetkoeppe
authored andcommitted
LWG3833 Remove specialization template<size_t N> struct formatter<const charT[N], charT>
1 parent c1aa3d2 commit 8160812

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

source/compatibility.tex

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,19 @@
249249
// implementation-defined number of \tcode{'*'} characters
250250
\end{codeblock}
251251

252+
\diffref{format.formatter.spec}
253+
\change
254+
Removed the \tcode{formatter} specialization
255+
\begin{codeblock}
256+
template<size_t N> struct formatter<const charT[N], charT>.
257+
\end{codeblock}
258+
\rationale
259+
The specialization is inconsistent with the design of \tcode{formatter},
260+
which is intended to be instantiated only with cv-unqualified object types.
261+
\effect
262+
Valid \CppXX{} code that instantiated the removed specialization
263+
can become ill-formed.
264+
252265
\rSec2[diff.cpp20.strings]{\ref{strings}: strings library}
253266

254267
\diffref{string.classes}

source/utilities.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15812,7 +15812,6 @@
1581215812
template<> struct formatter<charT*, charT>;
1581315813
template<> struct formatter<const charT*, charT>;
1581415814
template<size_t N> struct formatter<charT[N], charT>;
15815-
template<size_t N> struct formatter<const charT[N], charT>;
1581615815
template<class traits, class Allocator>
1581715816
struct formatter<basic_string<charT, traits, Allocator>, charT>;
1581815817
template<class traits>

0 commit comments

Comments
 (0)