GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::locale::combine(3) C++ Standard Libary std::locale::combine(3)

std::locale::combine - std::locale::combine


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.


The new, nameless, locale.


std::runtime_error if other does not implement Facet

// 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().combine<std::numpunct<char>>(std::locale("en_US.UTF8"));
std::cout.imbue(loc);
std::cout << "\"C\" locale with en_US numpunct: " << number << '\n';
}


"C" locale: 1000.25
"C" locale with en_US numpunct: 1,000.25


constructor constructs a new locale
(public member function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.