This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++14 status.

2271. regex_traits::lookup_classname specification unclear

Section: 32.6 [re.traits] Status: C++14 Submitter: Jonathan Wakely Opened: 2013-07-02 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [re.traits].

View all issues with C++14 status.


32.6 [re.traits] p9 says that regex_traits::lookup_classname should return a value that compares equal to 0, but there is no requirement that a bitmask type is equality comparable with 0, e.g. [bitmask.types] says bitmask types can be implemented using std::bitset.

Either there should be an additional requirement on the type or the function definition should be fixed.

[2013-09 Chicago]

Stefanus: Resolution looks good, doesn't seem to need fixing anywhere else from a quick look through the draft.

Any objection to Ready?

No objection.

Action: Move to Ready.

Proposed resolution:

This wording is relative to N3691.

  1. Edit 32.6 [re.traits] p9:

    template <class ForwardIterator>
      char_class_type lookup_classname(
        ForwardIterator first, ForwardIterator last, bool icase = false) const;

    -9- Returns: an unspecified value that represents the character classification named by the character sequence designated by the iterator range [first,last). If the parameter icase is true then the returned mask identifies the character classification without regard to the case of the characters being matched, otherwise it does honor the case of the characters being matched. The value returned shall be independent of the case of the characters in the character sequence. If the name is not recognized then returns a value that compares equal to 0char_class_type().