Title
Typo in narrow() semantics
Status
cd1
Section
[facet.ctype.char.members]
Submitter
Dietmar Kühl

Created on 1999-07-20.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

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

Date: 2010-10-21.18:28:33

[ 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? ]

Date: 2010-10-21.18:28:33

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

Date: 2010-10-21.18:28:33

Proposed resolution:

Change the returns clause in [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 [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.
Date: 1999-07-20.00:00:00

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.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1699
2010-10-21 18:28:33adminsetmessages: + msg1698
2010-10-21 18:28:33adminsetmessages: + msg1697
2010-10-21 18:28:33adminsetmessages: + msg1696
1999-07-20 00:00:00admincreate