Title
Missing regular expression traits requirements
Status
new
Section
[re.req]
Submitter
Jonathan Wakely

Created on 2014-09-30.00:00:00 last changed 48 months ago

Messages

Date: 2020-04-15.00:00:00

[ 2020-04-16, Jonathan adds that [re.regex.locale] requires the traits type to be default-initialized, despite no guarantee that the traits type is default constructible. ]

Date: 2014-09-30.00:00:00

The requirements on the traits class in [re.req] do not say whether a regular expression traits class is required to be DefaultConstructible, CopyConstructible, CopyAssignable etc.

The std::regex_traits class appears to be all of the above, but can basic_regex assume that for user-defined traits classes?

Should the following statements all leave u in equivalent states?

X u{v};
X u; u = v;
X u; u.imbue(v.getloc();

Whether they are equivalent has implications for basic_regex copy construction and assignment.

History
Date User Action Args
2020-04-16 09:23:10adminsetmessages: + msg11218
2014-09-30 00:00:00admincreate