Namespaces
Variants
Actions

std::regex_traits<CharT>::regex_traits

From cppreference.com
< cpp‎ | regex‎ | regex traits
 
C++
 
Text processing library
 
Regular expressions library
Classes
(C++11)
Algorithms
Iterators
Exceptions
Traits
Constants
(C++11)
Regex Grammar
 
std::regex_traits
regex_traits();

Default-constructs the std::regex_traits object, including default-constructing the private std::locale member or any other internal state as necessary.

[edit] Parameters

(none)

[edit] Return value

(none)

[edit] Example

#include <iostream>
#include <regex>
 
int main()
{
    std::locale::global(std::locale("en_US.utf8");
    std::regex_traits<char> r1;
    std::regex_traits<wchar_t> r2;
    std::cout << "The regex locale is " << r1.getloc().name() << '\n';
}

Output:

The regex locale is en_US.utf8

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant