Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::locale::global(3)	      C++ Standard Libary	std::locale::global(3)

NAME
       std::locale::global - std::locale::global

Synopsis
	  Defined in header <locale>
	  static locale	global(	const locale& loc );

	  Replaces  the	 global	 C++  locale  with loc,	which means all	future
       calls to	the
	  std::locale default constructor will now return a copy  of  loc.  If
       loc has a name,
	  also	 replaces   the	 C  locale  as	if  by	std::setlocale(LC_ALL,
       loc.name().c_str());.
	  This function	is the only way	to modify the global C++ locale, which
       is otherwise
	  equivalent to	std::locale::classic() at program startup.

Parameters
	  loc -	the new	global C++ locale

Return value
	  The previous value of	the global C++ locale.

Example
	   This	section	is incomplete
	   Reason: no example

	  Defect reports

	  The following	behavior-changing defect reports were applied retroac-
       tively to
	  previously published C++ standards.

	   DR	   Applied    to		 Behavior     as     published
       Correct behavior
			   it	 was   unspecified   whether   other   library
       specified (no other
	  LWG 8	C++98	   functions (such				   li-
       brary functions
			   as std::setlocale) can modify the global C++	   al-
       lowed)
			   locale

See also
	  constructor	constructs a new locale
			(public	member function)
	  classic	obtains	a reference to the "C" locale
	  [static]	(public	static member function)
	  setlocale	gets and sets the current C locale
			(function)

Category:
	    * Todo no example

http://cppreference.com		  2024.06.10		std::locale::global(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::locale::global&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help