25. String operator<< uses width() value wrong

Section: [string.io] Status: TC1 Submitter: Nathan Myers Opened: 1998-08-06 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View all other issues in [string.io].

View all issues with TC1 status.

Duplicate of: 67


In the description of operator<< applied to strings, the standard says that uses the smaller of os.width() and str.size(), to pad "as described in stage 3" elsewhere; but this is inconsistent, as this allows no possibility of space for padding.

Proposed resolution:

Change [string.io] paragraph 4 from:

    "... where n is the smaller of os.width() and str.size(); ..."


    "... where n is the larger of os.width() and str.size(); ..."