cpp/regex/regex traits

The type trait template supplies std with the set of types and functions necessary to operate on the type.

Since many of regex operations are locale-sensitive (when std flag is set), the regex_traits class typically holds an instance of a std as a private member.

Standard specializations
Two specializations of are defined by the standard library:

These specializations make it possible to use (aka std) and  (aka std). To use std with other character types (for example, ), a user-provided trait class must be used.