.TH "std::regex_traits< _Ch_type >" 3cxx "libstdc++" \" -*- nroff -*-
.ad l
.nh
.SH NAME
std::regex_traits< _Ch_type > \- Describes aspects of a regular expression\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <regex>\fP
.SS "Public Types"

.in +1c
.ti -1c
.RI "\fBtypedef\fP _RegexMask \fBchar_class_type\fP"
.br
.ti -1c
.RI "\fBtypedef\fP \fB_Ch_type\fP \fBchar_type\fP"
.br
.ti -1c
.RI "\fBtypedef\fP \fBstd::locale\fP \fBlocale_type\fP"
.br
.ti -1c
.RI "\fBtypedef\fP \fBstd::basic_string\fP< \fBchar_type\fP > \fBstring_type\fP"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBregex_traits\fP ()"
.br
.RI "Constructs a default traits object\&. "
.ti -1c
.RI "\fBlocale_type\fP \fBgetloc\fP () \fBconst\fP"
.br
.RI "Gets a copy of the current locale in use by the regex_traits object\&. "
.ti -1c
.RI "\fBlocale_type\fP \fBimbue\fP (\fBlocale_type\fP \fB__loc\fP)"
.br
.RI "Imbues the regex_traits object with a copy of a new locale\&. "
.ti -1c
.RI "bool \fBisctype\fP (\fB_Ch_type\fP __c, char_class_type __f) \fBconst\fP"
.br
.RI "Determines if \fCc\fP is a member of an identified class\&. "
.ti -1c
.RI "template<\fBtypename\fP \fB_Fwd_iter\fP > char_class_type \fBlookup_classname\fP (\fB_Fwd_iter\fP __first, \fB_Fwd_iter\fP __last, bool \fB__icase\fP=\fBfalse\fP) \fBconst\fP"
.br
.RI "Maps one or more characters to a named character classification\&. "
.ti -1c
.RI "template<\fBtypename\fP \fB_Fwd_iter\fP > \fBstring_type\fP \fBlookup_collatename\fP (\fB_Fwd_iter\fP __first, \fB_Fwd_iter\fP __last) \fBconst\fP"
.br
.RI "Gets a collation element by name\&. "
.ti -1c
.RI "template<\fBtypename\fP \fB_Fwd_iter\fP > \fBstring_type\fP \fBtransform\fP (\fB_Fwd_iter\fP __first, \fB_Fwd_iter\fP __last) \fBconst\fP"
.br
.RI "Gets a sort key for a character sequence\&. "
.ti -1c
.RI "template<\fBtypename\fP \fB_Fwd_iter\fP > \fBstring_type\fP \fBtransform_primary\fP (\fB_Fwd_iter\fP __first, \fB_Fwd_iter\fP __last) \fBconst\fP"
.br
.RI "Gets a sort key for a character sequence, independent of case\&. "
.ti -1c
.RI "\fBchar_type\fP \fBtranslate\fP (\fBchar_type\fP __c) \fBconst\fP"
.br
.RI "Performs the identity translation\&. "
.ti -1c
.RI "\fBchar_type\fP \fBtranslate_nocase\fP (\fBchar_type\fP __c) \fBconst\fP"
.br
.RI "Translates a character into a case-insensitive equivalent\&. "
.ti -1c
.RI "int \fBvalue\fP (\fB_Ch_type\fP \fB__ch\fP, int __radix) \fBconst\fP"
.br
.RI "Converts a digit to an int\&. "
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBstatic\fP std::size_t \fBlength\fP (\fBconst\fP \fBchar_type\fP *__p)"
.br
.RI "Gives the length of a C-style string starting at \fC__p\fP\&. "
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBlocale_type\fP \fB_M_locale\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 

.SS "template<\fBtypename\fP \fB_Ch_type\fP>
.br
class std::regex_traits< _Ch_type >"Describes aspects of a regular expression\&. 

A regular expression traits class that satisfies the requirements of section [28\&.7]\&.
.PP
The class regex is parameterized around a set of related types and functions used to complete the definition of its semantics\&. This class satisfies the requirements of such a traits class\&.
.PP
\fBSince\fP
.RS 4
C++11 
.RE
.PP

.SH "Constructor & Destructor Documentation"
.PP 
.SS "template<\fBtypename\fP \fB_Ch_type\fP > \fBstd::regex_traits\fP< \fB_Ch_type\fP >::regex_traits ()\fC [inline]\fP"

.PP
Constructs a default traits object\&. 
.SH "Member Function Documentation"
.PP 
.SS "template<\fBtypename\fP \fB_Ch_type\fP > \fBlocale_type\fP \fBstd::regex_traits\fP< \fB_Ch_type\fP >::getloc () const\fC [inline]\fP"

.PP
Gets a copy of the current locale in use by the regex_traits object\&. 
.SS "template<\fBtypename\fP \fB_Ch_type\fP > \fBlocale_type\fP \fBstd::regex_traits\fP< \fB_Ch_type\fP >::imbue (\fBlocale_type\fP __loc)\fC [inline]\fP"

.PP
Imbues the regex_traits object with a copy of a new locale\&. 
.PP
\fBParameters\fP
.RS 4
\fI__loc\fP A locale\&.
.RE
.PP
\fBReturns\fP
.RS 4
a copy of the previous locale in use by the regex_traits object\&.
.RE
.PP
\fBNote\fP
.RS 4
Calling imbue with a different locale than the one currently in use invalidates all cached data held by *this\&. 
.RE
.PP

.SS "template<\fBtypename\fP \fB_Ch_type\fP > bool \fBstd::regex_traits\fP< \fB_Ch_type\fP >::isctype (\fB_Ch_type\fP __c, char_class_type __f) const"

.PP
Determines if \fCc\fP is a member of an identified class\&. 
.PP
\fBParameters\fP
.RS 4
\fI__c\fP a character\&. 
.br
\fI__f\fP a class type (as returned from lookup_classname)\&.
.RE
.PP
\fBReturns\fP
.RS 4
true if the character \fC__c\fP is a member of the classification represented by \fC__f\fP, false otherwise\&.
.RE
.PP
\fBExceptions\fP
.RS 4
\fIstd::bad_cast\fP if the current locale does not have a ctype facet\&. 
.RE
.PP

.SS "template<\fBtypename\fP \fB_Ch_type\fP > \fBstatic\fP std::size_t \fBstd::regex_traits\fP< \fB_Ch_type\fP >::length (\fBconst\fP \fBchar_type\fP * __p)\fC [inline]\fP, \fC [static]\fP"

.PP
Gives the length of a C-style string starting at \fC__p\fP\&. 
.PP
\fBParameters\fP
.RS 4
\fI__p\fP a pointer to the start of a character sequence\&.
.RE
.PP
\fBReturns\fP
.RS 4
the number of characters between \fC*__p\fP and the first default-initialized value of type \fCchar_type\fP\&. In other words, uses the C-string algorithm for determining the length of a sequence of characters\&. 
.RE
.PP

.SS "template<\fBtypename\fP \fB_Ch_type\fP > template<\fBtypename\fP \fB_Fwd_iter\fP > \fBregex_traits\fP< \fB_Ch_type\fP >::char_class_type \fBstd::regex_traits\fP< \fB_Ch_type\fP >::lookup_classname (\fB_Fwd_iter\fP __first, \fB_Fwd_iter\fP __last, bool __icase = \fC\fBfalse\fP\fP) const"

.PP
Maps one or more characters to a named character classification\&. 
.PP
\fBParameters\fP
.RS 4
\fI__first\fP beginning of the character sequence\&. 
.br
\fI__last\fP one-past-the-end of the character sequence\&. 
.br
\fI__icase\fP ignores the case of the classification name\&.
.RE
.PP
\fBReturns\fP
.RS 4
an unspecified value that represents the character classification named by the character sequence designated by the iterator range [__first, __last)\&. If \fCicase\fP 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\&.
.RE
.PP
At least the following names (or their wide-character equivalent) are supported\&.
.IP "\(bu" 2
d
.IP "\(bu" 2
w
.IP "\(bu" 2
s
.IP "\(bu" 2
alnum
.IP "\(bu" 2
alpha
.IP "\(bu" 2
blank
.IP "\(bu" 2
cntrl
.IP "\(bu" 2
digit
.IP "\(bu" 2
graph
.IP "\(bu" 2
lower
.IP "\(bu" 2
print
.IP "\(bu" 2
punct
.IP "\(bu" 2
space
.IP "\(bu" 2
upper
.IP "\(bu" 2
xdigit 
.PP

.SS "template<\fBtypename\fP \fB_Ch_type\fP > template<\fBtypename\fP \fB_Fwd_iter\fP > \fBregex_traits\fP< \fB_Ch_type\fP >::string_type \fBstd::regex_traits\fP< \fB_Ch_type\fP >::lookup_collatename (\fB_Fwd_iter\fP __first, \fB_Fwd_iter\fP __last) const"

.PP
Gets a collation element by name\&. 
.PP
\fBParameters\fP
.RS 4
\fI__first\fP beginning of the collation element name\&. 
.br
\fI__last\fP one-past-the-end of the collation element name\&.
.RE
.PP
\fBReturns\fP
.RS 4
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\&. 
.RE
.PP

.SS "template<\fBtypename\fP \fB_Ch_type\fP > template<\fBtypename\fP \fB_Fwd_iter\fP > \fBstring_type\fP \fBstd::regex_traits\fP< \fB_Ch_type\fP >::transform (\fB_Fwd_iter\fP __first, \fB_Fwd_iter\fP __last) const\fC [inline]\fP"

.PP
Gets a sort key for a character sequence\&. 
.PP
\fBParameters\fP
.RS 4
\fI__first\fP beginning of the character sequence\&. 
.br
\fI__last\fP one-past-the-end of the character sequence\&.
.RE
.PP
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)\&.
.PP
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\&.
.PP
\fBReturns\fP
.RS 4
a locale-specific sort key equivalent to the input range\&.
.RE
.PP
\fBExceptions\fP
.RS 4
\fIstd::bad_cast\fP if the current locale does not have a collate facet\&. 
.RE
.PP

.PP
Referenced by \fBstd::regex_traits< _Ch_type >::transform_primary()\fP\&.
.SS "template<\fBtypename\fP \fB_Ch_type\fP > template<\fBtypename\fP \fB_Fwd_iter\fP > \fBstring_type\fP \fBstd::regex_traits\fP< \fB_Ch_type\fP >::transform_primary (\fB_Fwd_iter\fP __first, \fB_Fwd_iter\fP __last) const\fC [inline]\fP"

.PP
Gets a sort key for a character sequence, independent of case\&. 
.PP
\fBParameters\fP
.RS 4
\fI__first\fP beginning of the character sequence\&. 
.br
\fI__last\fP one-past-the-end of the character sequence\&.
.RE
.PP
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\&.
.PP
\fBTodo\fP
.RS 4
Implement this function correctly\&. 
.RE
.PP

.PP
References \fBstd::regex_traits< _Ch_type >::transform()\fP\&.
.SS "template<\fBtypename\fP \fB_Ch_type\fP > \fBchar_type\fP \fBstd::regex_traits\fP< \fB_Ch_type\fP >::translate (\fBchar_type\fP __c) const\fC [inline]\fP"

.PP
Performs the identity translation\&. 
.PP
\fBParameters\fP
.RS 4
\fI__c\fP A character to the locale-specific character set\&.
.RE
.PP
\fBReturns\fP
.RS 4
__c\&. 
.RE
.PP

.SS "template<\fBtypename\fP \fB_Ch_type\fP > \fBchar_type\fP \fBstd::regex_traits\fP< \fB_Ch_type\fP >::translate_nocase (\fBchar_type\fP __c) const\fC [inline]\fP"

.PP
Translates a character into a case-insensitive equivalent\&. 
.PP
\fBParameters\fP
.RS 4
\fI__c\fP A character to the locale-specific character set\&.
.RE
.PP
\fBReturns\fP
.RS 4
the locale-specific lower-case equivalent of __c\&. 
.RE
.PP
\fBExceptions\fP
.RS 4
\fIstd::bad_cast\fP if the imbued locale does not support the ctype facet\&. 
.RE
.PP

.SS "template<\fBtypename\fP \fB_Ch_type\fP > int \fBstd::regex_traits\fP< \fB_Ch_type\fP >::value (\fB_Ch_type\fP __ch, int __radix) const"

.PP
Converts a digit to an int\&. 
.PP
\fBParameters\fP
.RS 4
\fI__ch\fP a character representing a digit\&. 
.br
\fI__radix\fP the radix if the numeric conversion (limited to 8, 10, or 16)\&.
.RE
.PP
\fBReturns\fP
.RS 4
the value represented by the digit __ch in base radix if the character __ch is a valid digit in base radix; otherwise returns -1\&. 
.RE
.PP

.PP
References \fBstd::hex()\fP, and \fBstd::oct()\fP\&.

.SH "Author"
.PP 
Generated automatically by Doxygen for libstdc++ from the source code\&.