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::basic_ios::imbue(3) C++ Standard Libary std::basic_ios::imbue(3)

std::basic_ios::imbue - std::basic_ios::imbue


std::locale imbue( const std::locale& loc );


Replaces the current locale. Effectively calls ios_base::imbue(loc) and if there is
an associated stream buffer (rdbuf() != 0), then calls rdbuf()->pubimbue(loc).


loc - the new locale


The previous locale, as returned by ios_base::imbue(loc).


May throw implementation-defined exceptions.

// Run this code


#include <iostream>
#include <sstream>
#include <locale>


int main()
{
std::istringstream iss;
iss.imbue(std::locale("en_US.UTF8"));


std::cout << "Current locale: " << iss.getloc().name() << '\n';


iss.imbue(std::locale());
std::cout << "Global locale : " << iss.getloc().name() << '\n';
}


Current locale: en_US.UTF8
Global locale : C

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.