Skip to content

Commit 786ee9c

Browse files
[filebuf] Add missing const to pointer variables
The fourth parameter of `codecvt::out` and `codecvt::in` are `const C*&`, but _Effects_ use `C*` variables, which makes the call ill-formed. The intent seems sufficient clear and we should probably use `const C*` variables in these places.
1 parent 0201407 commit 786ee9c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

source/iostreams.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11431,10 +11431,10 @@
1143111431
and then as if by doing:
1143211432

1143311433
\begin{codeblock}
11434-
char extern_buf[XSIZE];
11435-
char* extern_end;
11436-
charT intern_buf[ISIZE];
11437-
charT* intern_end;
11434+
char extern_buf[XSIZE];
11435+
const char* extern_end;
11436+
charT intern_buf[ISIZE];
11437+
charT* intern_end;
1143811438
codecvt_base::result r =
1143911439
a_codecvt.in(state, extern_buf, extern_buf+XSIZE, extern_end,
1144011440
intern_buf, intern_buf+ISIZE, intern_end);
@@ -11562,11 +11562,11 @@
1156211562
except that the behavior of ``consuming characters'' is performed by first
1156311563
converting as if by:
1156411564
\begin{codeblock}
11565-
charT* b = pbase();
11566-
charT* p = pptr();
11567-
charT* end;
11568-
char xbuf[XSIZE];
11569-
char* xbuf_end;
11565+
charT* b = pbase();
11566+
charT* p = pptr();
11567+
const charT* end;
11568+
char xbuf[XSIZE];
11569+
char* xbuf_end;
1157011570
codecvt_base::result r =
1157111571
a_codecvt.out(state, b, p, end, xbuf, xbuf+XSIZE, xbuf_end);
1157211572
\end{codeblock}

0 commit comments

Comments
 (0)