FreeBSD Manual Pages
std::locale::combine(3) C++ Standard Libary std::locale::combine(3) NAME std::locale::combine - std::locale::combine Synopsis Defined in header <locale> template< class Facet > locale combine( const locale& other ) const; Constructs a locale object which is a copy of *this except for the facet of type Facet, which is copied from other. Return value The new, nameless, locale. Exceptions std::runtime_error if other does not implement Facet Example // Run this code #include <iostream> #include <locale> int main() { const double number = 1000.25; std::cout << "\"C\" locale: " << number << '\n'; std::locale loc = std::locale().com- bine<std::numpunct<char>>(std::locale("en_US.UTF8")); std::cout.imbue(loc); std::cout << "\"C\" locale with en_US numpunct: " << number << '\n'; } Output: "C" locale: 1000.25 "C" locale with en_US numpunct: 1,000.25 See also constructor constructs a new locale (public member function) http://cppreference.com 2022.07.31 std::locale::combine(3)
NAME | Synopsis | Return value | Exceptions | Example | Output: | See also
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::locale::combine&sektion=3&manpath=FreeBSD+Ports+15.0>
