[PATCH] Fix libstdc++/5708

Martin Sebor sebor@roguewave.com
Mon Feb 18 18:48:00 GMT 2002

Nathan Myers wrote:
> >
> > It seems quite clear in the Note in, p2:
> >
> >     ...If the number of characters generated for the specified format
> >     is less than the value returned by str.width() on entry to the
> >     function, then copies of fill are inserted as necessary to pad to
> >     the specified width. ...
> >
> > The Note should probably be normative, but other than that I don't
> > think there's any doubt about whether it's fill that's used for
> > padding.
> There's no question that the fill character is to be used for padding.
> At issue, however, is whether the position marked "space" in the format
> should (also) have a space.  In fact, the standard states unambiguously
> that a space must appear there.  It is also clear that copies of the
> fill character are to be added, next to it, if more characters are needed
> to achieve the required width.

It didn't occur to me that the two could be treated differently,
especially since the Note in, p2 goes on to say:

    ...For the value af equal to (str.flags() & str.adjustfield),
    if (af ==str.internal) is true, the fill characters are placed
    where none or space appears in the formatting pattern; ...

Or am I still missing something?


More information about the Libstdc++ mailing list