Skip to content

[filebuf.virtuals] Missing const-qualifiers in specification of overflow/underflow. #8256

@keinflue

Description

@keinflue

[filebuf.virtuals] contains the following code snippet for the specification of overflow:

charT* b = pbase();
charT* p = pptr();
charT* end;
char   xbuf[XSIZE];
char*  xbuf_end;
codecvt_base::result r =
  a_codecvt.out(state, b, p, end, xbuf, xbuf+XSIZE, xbuf_end);

This is missing a const on end because out takes the argument as const charT*&.

Similarly the specification of underflow contains:

char   extern_buf[XSIZE];
char*  extern_end;
charT  intern_buf[ISIZE];
charT* intern_end;
codecvt_base::result r =
  a_codecvt.in(state, extern_buf, extern_buf+XSIZE, extern_end,
               intern_buf, intern_buf+ISIZE, intern_end);

where a const is missing on extern_end.

I am not sure this can be handled as editorial, but at least the intention here seems obvious to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions