template<typename_Ch_type>locale_typestd::regex_traits<_Ch_type>::getloc()const[inline]
Gets a copy of the current locale in use by the regex_traits object.
template<typename_Ch_type>locale_typestd::regex_traits<_Ch_type>::imbue(locale_type__loc)[inline]
Imbues the regex_traits object with a copy of a new locale.
Parameters__loc A locale.
Returns
a copy of the previous locale in use by the regex_traits object.
Note
Calling imbue with a different locale than the one currently in use invalidates all cached data held
by *this.
References std::swap().
template<typename_Ch_type>boolstd::regex_traits<_Ch_type>::isctype(_Ch_type__c,char_class_type__f)const
Determines if c is a member of an identified class.
Parameters__c a character.
__f a class type (as returned from lookup_classname).
Returns
true if the character __c is a member of the classification represented by __f, false otherwise.
Exceptionsstd::bad_cast if the current locale does not have a ctype facet.
template<typename_Ch_type>staticstd::size_tstd::regex_traits<_Ch_type>::length(constchar_type*__p)[inline],[static]
Gives the length of a C-style string starting at __p.
Parameters__p a pointer to the start of a character sequence.
Returns
the number of characters between *__p and the first default-initialized value of type char_type. In
other words, uses the C-string algorithm for determining the length of a sequence of characters.
template<typename_Ch_type>template<typename_Fwd_iter>regex_traits<_Ch_type>::char_class_typestd::regex_traits<_Ch_type>::lookup_classname(_Fwd_iter__first,_Fwd_iter__last,bool__icase=false)const
Maps one or more characters to a named character classification.
Parameters__first beginning of the character sequence.
__last one-past-the-end of the character sequence.
__icase ignores the case of the classification name.
Returns
an unspecified value that represents the character classification named by the character sequence
designated by the iterator range [__first, __last). If icase is true, the returned mask identifies
the classification regardless of the case of the characters to be matched (for example, [[:lower:]]
is the same as [[:alpha:]]), otherwise a case-dependent classification is returned. 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 0.
At least the following names (or their wide-character equivalent) are supported.
• d
• w
• s
• alnum
• alpha
• blank
• cntrl
• digit
• graph
• lower
• print
• punct
• space
• upper
• xdigit
template<typename_Ch_type>template<typename_Fwd_iter>regex_traits<_Ch_type>::string_typestd::regex_traits<_Ch_type>::lookup_collatename(_Fwd_iter__first,_Fwd_iter__last)const
Gets a collation element by name.
Parameters__first beginning of the collation element name.
__last one-past-the-end of the collation element name.
Returns
a sequence of one or more characters that represents the collating element consisting of the
character sequence designated by the iterator range [__first, __last). Returns an empty string if the
character sequence is not a valid collating element.
template<typename_Ch_type>template<typename_Fwd_iter>string_typestd::regex_traits<_Ch_type>::transform(_Fwd_iter__first,_Fwd_iter__last)const[inline]
Gets a sort key for a character sequence.
Parameters__first beginning of the character sequence.
__last one-past-the-end of the character sequence.
Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the
character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) <
v.transform(H1, H2).
What this really does is provide a more efficient way to compare a string to multiple other strings in
locales with fancy collation rules and equivalence classes.
Returns
a locale-specific sort key equivalent to the input range.
Exceptionsstd::bad_cast if the current locale does not have a collate facet.
Referenced by std::regex_traits<_Ch_type>::transform_primary().
template<typename_Ch_type>template<typename_Fwd_iter>string_typestd::regex_traits<_Ch_type>::transform_primary(_Fwd_iter__first,_Fwd_iter__last)const[inline]
Gets a sort key for a character sequence, independent of case.
Parameters__first beginning of the character sequence.
__last one-past-the-end of the character sequence.
Effects: if typeid(use_facet<collate<_Ch_type> >) == typeid(collate_byname<_Ch_type>) and the form of the
sort key returned by collate_byname<_Ch_type>::transform(__first, __last) is known and can be converted
into a primary sort key then returns that key, otherwise returns an empty string.
Todo
Implement this function correctly.
References std::regex_traits<_Ch_type>::transform().
template<typename_Ch_type>char_typestd::regex_traits<_Ch_type>::translate(char_type__c)const[inline]
Performs the identity translation.
Parameters__c A character to the locale-specific character set.
Returns
__c.
template<typename_Ch_type>char_typestd::regex_traits<_Ch_type>::translate_nocase(char_type__c)const[inline]
Translates a character into a case-insensitive equivalent.
Parameters__c A character to the locale-specific character set.
Returns
the locale-specific lower-case equivalent of __c.
Exceptionsstd::bad_cast if the imbued locale does not support the ctype facet.
template<typename_Ch_type>intstd::regex_traits<_Ch_type>::value(_Ch_type__ch,int__radix)const
Converts a digit to an int.
Parameters__ch a character representing a digit.
__radix the radix if the numeric conversion (limited to 8, 10, or 16).
Returns
the value represented by the digit __ch in base radix if the character __ch is a valid digit in base
radix; otherwise returns -1.
References std::hex(), and std::oct().