153. Typo in narrow() semantics

Section: 28.3.4.2.4.3 [facet.ctype.char.members] Status: CD1 Submitter: Dietmar Kühl Opened: 1999-07-20 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [facet.ctype.char.members].

View all issues with CD1 status.

Duplicate of: 207

Discussion:

The description of the array version of narrow() (in paragraph 11) is flawed: There is no member do_narrow() which takes only three arguments because in addition to the range a default character is needed.

Additionally, for both widen and narrow we have two signatures followed by a Returns clause that only addresses one of them.

Proposed resolution:

Change the returns clause in 28.3.4.2.4.3 [facet.ctype.char.members] paragraph 10 from:

    Returns: do_widen(low, high, to).

to:

    Returns: do_widen(c) or do_widen(low, high, to), respectively.

Change 28.3.4.2.4.3 [facet.ctype.char.members] paragraph 10 and 11 from:

        char        narrow(char c, char /*dfault*/) const;
        const char* narrow(const char* low, const char* high,
                           char /*dfault*/, char* to) const;
        Returns: do_narrow(low, high, to).

to:

        char        narrow(char c, char dfault) const;
        const char* narrow(const char* low, const char* high,
                           char dfault, char* to) const;
        Returns: do_narrow(c, dfault) or
                 do_narrow(low, high, dfault, to), respectively.

[Kona: 1) the problem occurs in additional places, 2) a user defined version could be different.]

[Post-Tokyo: Dietmar provided the above wording at the request of the LWG. He could find no other places the problem occurred. He asks for clarification of the Kona "a user defined version..." comment above. Perhaps it was a circuitous way of saying "dfault" needed to be uncommented?]

[Post-Toronto: the issues list maintainer has merged in the proposed resolution from issue 207, which addresses the same paragraphs.]