Skip to content

Commit 89c1f6c

Browse files
burblebeetkoeppe
authored andcommitted
LWG3881 Incorrect formatting of container adapters backed by std::string
1 parent ef1d310 commit 89c1f6c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

source/containers.tex

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17671,9 +17671,12 @@
1767117671
template<class charT, class T, @\libconcept{formattable}@<charT> Container, class... U>
1767217672
struct formatter<@\placeholder{adaptor-type}@<T, Container, U...>, charT> {
1767317673
private:
17674-
using @\exposid{maybe-const-adaptor}@ = // \expos
17675-
@\exposid{fmt-maybe-const}@<@\placeholder{adaptor-type}@<T, Container, U...>, charT>;
17676-
formatter<Container, charT> @\exposid{underlying_}@; // \expos
17674+
using @\exposid{maybe-const-container}@ = // \expos
17675+
@\exposid{fmt-maybe-const}@<Container, charT>;
17676+
using @\exposid{maybe-const-adaptor}@ = // \expos
17677+
@\exposid{maybe-const}@<is_const_v<@\exposid{maybe-const-container}@>, // see \ref{ranges.syn}
17678+
@\placeholder{adaptor-type}@<T, Container, U...>>;
17679+
formatter<ranges::ref_view<@\exposid{maybe-const-container}@>, charT> @\exposid{underlying_}@; // \expos
1767717680

1767817681
public:
1767917682
template<class ParseContext>

0 commit comments

Comments
 (0)