In the standard regex_traits, an object uses the global locale (locale::global) on construction. By calling this function a new locale is assigned, and any information cached in the object is cleared.
This function is called by regex::imbue to imbue a new locale.
Parameters
loc
locale object to be imbued as the new locale for the regex_traits. locale_type is a member type, defined in regex_traits as an alias of the standard locale type.
Return value
The locale object associated with the regex_traits object before the call. locale_type is a member type, defined in regex_traits as an alias of the standard locale type.