This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++14 status.

2293. Wrong facet used by num_put::do_put

Section: 28.3.4.3.3.3 [facet.num.put.virtuals] Status: C++14 Submitter: Juan Soulie Opened: 2013-09-04 Last modified: 2017-07-05

Priority: 0

View other active issues in [facet.num.put.virtuals].

View all other issues in [facet.num.put.virtuals].

View all issues with C++14 status.

Discussion:

At the end of 28.3.4.3.3.3 [facet.num.put.virtuals] (in p6), the return value is said to be obtained by calling truename or falsename on the wrong facet: ctype should be replaced by numpunct.

[Issaquah 2014-02-11: Move to Immediate]

Proposed resolution:

This wording is relative to N3691.

  1. Edit 28.3.4.3.3.3 [facet.num.put.virtuals] p6 as indicated:

    -6- Returns: If (str.flags() & ios_base::boolalpha) == 0 returns do_put(out, str, fill, (int)val), otherwise obtains a string s as if by

    string_type s =
      val ? use_facet<ctypenumpunct<charT> >(loc).truename()
          : use_facet<ctypenumpunct<charT> >(loc).falsename();
    

    and then inserts each character c of s into out via *out++ = c and returns out.