Title
to_string needs updating with zero and one
Status
c++11
Section
[template.bitset]
Submitter
Howard Hinnant

Created on 2008-06-18.00:00:00 last changed 161 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

  1. replace in [template.bitset]/1 (class bitset)

    template <class charT, class traits>
      basic_string<charT, traits, allocator<charT> >
      to_string(charT zero = charT('0'), charT one = charT('1')) const;
    template <class charT>
      basic_string<charT, char_traits<charT>, allocator<charT> >
      to_string(charT zero = charT('0'), charT one = charT('1')) const;
    basic_string<char, char_traits<char>, allocator<char> >
      to_string(char zero = '0', char one = '1') const;
    
  2. replace in [bitset.members]/37

    template <class charT, class traits>
      basic_string<charT, traits, allocator<charT> >
      to_string(charT zero = charT('0'), charT one = charT('1')) const;
    

    37 Returns: to_string<charT, traits, allocator<charT> >(zero, one).

  3. replace in [bitset.members]/38

    template <class charT>
      basic_string<charT, char_traits<charT>, allocator<charT> >
      to_string(charT zero = charT('0'), charT one = charT('1')) const;
    

    38 Returns: to_string<charT, char_traits<charT>, allocator<charT> >(zero, one).

  4. replace in [bitset.members]/39

    basic_string<char, char_traits<char>, allocator<char> >
      to_string(char zero = '0', char one = '1') const;
    

    39 Returns: to_string<char, char_traits<char>, allocator<char> >(zero, one).

Date: 2009-05-09.00:00:00

[ 2009-05-09: See alternative solution in issue 1113. ]

Date: 2010-10-21.18:28:33

[ Post Summit: ]

Alisdair: suggest to not repeat the default arguments in B, C, D (definition of to_string members)

Walter: This is not really a definition.

Consensus: Add note to the editor: Please apply editor's judgement whether default arguments should be repeated for B, C, D changes.

Recommend Tentatively Ready.

Date: 2010-10-21.18:28:33

[ post San Francisco: ]

Daniel found problems with the wording and provided fixes. Moved from Ready to Review.

Date: 2008-06-18.00:00:00

Issue 396 adds defaulted arguments to the to_string member, but neglects to update the three newer to_string overloads.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg4057
2010-10-21 18:28:33adminsetmessages: + msg4056
2010-10-21 18:28:33adminsetmessages: + msg4055
2010-10-21 18:28:33adminsetmessages: + msg4054
2008-06-18 00:00:00admincreate