Title
Missing 'noexcept' on basic_regex move-assignment operator
Status
c++11
Section
[re.regex]
Submitter
Jonathan Wakely

Created on 2011-02-16.00:00:00 last changed 161 months ago

Messages

Date: 2011-02-24.18:44:41

Proposed resolution:

  1. Modify the basic_regex synopsis in [re.regex] p. 3:

    namespace std {
      template <class charT,
                class traits = regex_traits<charT> >
      class basic_regex {
      public:
        ...
        basic_regex& operator=(const basic_regex&);
        basic_regex& operator=(basic_regex&&) noexcept;
        basic_regex& operator=(const charT* ptr);
        ...
      };
    }
    
  2. Modify [re.regex.assign] p. 2:

    basic_regex& operator=(basic_regex&& e) noexcept;
    

    2 Effects: returns assign(std::move(e)).

Date: 2011-02-24.00:00:00

[ 2011-02-24 Reflector discussion ]

Moved to Tentatively Ready after 7 votes.

Date: 2011-02-16.00:00:00

N3149 replaced the "Throws: nothing" clause on basic_regex::assign(basic_regex&&) with the noexcept keyword. The effects of the move-assignment operator are defined in terms of the assign() function, so the "Throws: nothing" applied there too, and a noexcept-specification should be added there too.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2011-04-11 11:23:23adminsetstatus: voting -> wp
2011-03-05 15:24:28adminsetstatus: ready -> voting
2011-02-24 18:44:41adminsetmessages: + msg5535
2011-02-24 18:44:41adminsetstatus: new -> ready
2011-02-16 19:01:37adminsetmessages: + msg5498
2011-02-16 00:00:00admincreate