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

### 1337. Swapped arguments in `regex_traits::isctype`

Section: 30.6 [re.traits] Status: C++11 Submitter: Howard Hinnant Opened: 2010-06-21 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [re.traits].

View all issues with C++11 status.

Discussion:

30.6 [re.traits]/12 describes `regex_traits::isctype` in terms of `ctype::is(c, m)`, where `c` is a `charT` and `m` is a `ctype_base::mask`. Unfortunately 28.4.2.2.2 [locale.ctype.members] specifies this function as `ctype::is(m, c)`

[ Post-Rapperswil: ]

> Moved to Tentatively Ready after 5 positive votes on c++std-lib.

[ Adopted at 2010-11 Batavia ]

Proposed resolution:

Change 30.6 [re.traits] p.12:

>     bool isctype(charT c, char_class_type f) const;

> > 11 ...

> > 12 Returns: Converts `f` into a value `m` of type `std::ctype_base::mask` in an unspecified manner, and returns `true` if `use_facet<ctype<charT> >(getloc()).is(cm, mc)` is `true`. Otherwise returns `true` if `f` bitwise or'ed with the result of calling `lookup_classname` with an iterator pair that designates the character sequence `"w"` is not equal to 0 and `c == '_'`, or if `f` bitwise or'ed with the result of calling `lookup_classname` with an iterator pair that designates the character sequence `"blank"` is not equal to 0 and `c` is one of an implementation-defined subset of the characters for which `isspace(c, getloc())` returns `true`, otherwise returns `false`.