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

Section: 24.3.3.9 [string.io] Status: TC1 Submitter: Nathan Myers Opened: 1998-08-06 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [string.io].

View all issues with TC1 status.

Duplicate of: 67

Discussion:

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 24.3.3.9 [string.io] paragraph 4 from:

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

to:

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