std::regex_traits::imbue(3)
β¨ NAME β¨
Welcome to the <pink>std::regex_traits::imbue(3)</pink> manual page, straight from the <purple>C++ Standard Libary</purple> β yes, that's the manual name, and she's serving. The function in the spotlight is std::regex_traits::imbue, and this page is literally all about her. π
πΈ Synopsis πΈ
locale_type imbue( locale_type loc ); (since C++11)
She's been around since C++11, and she's ready to switch up your locale. β¨
Okay so here's the tea: imbue replaces the current locale with a copy of loc. If loc is different than the current locale, then all cached data is invalidated.
β οΈ heads up bestie: that invalidation is the whole caveat. If loc is different than the current locale, then all cached data is invalidated. Not me being dramatic β that's just what the page says. π
After the call, getloc() == loc. Slay.
π Parameters π
locβ the locale to imbue. That's it, that's the parameter. π
π¦ Return value π¦
The current locale of the traits object. β¨
If imbue() has been never called for this object, then the global locale at the time of the call is returned. Otherwise, the locale passed to the last call to imbue() is returned. So: first time? global locale from the moment of the call. After that? whatever loc you passed last. iykyk. π
π Example π
This section is incomplete Reason: no example
The source really left us on read with no example. π
π See also π
getlocβgetlocgets the locale (public member function). She's the bestie that tells you what locale you're in. π
π Category π
Todo no example
xoxo, your C++ bestie π
β source/version: http://cppreference.com; date: 2024.06.10; page: std::regex_traits::imbue(3). mwah π«Ά
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms