std::moneypunct_byname
Min standard notice:
Header: <locale>
std::moneypunct_byname is a std::moneypunct facet which encapsulates monetary formatting preferences of a locale specified at its construction.
# Declarations
template< class CharT, bool Intl = false >
class moneypunct_byname : public std::moneypunct<CharT, Intl>;
# Parameters
name: the name of the localerefs: the number of references that link to the facet
# Example
#include <iomanip>
#include <iostream>
#include <locale>
int main()
{
long double mon = 1234567;
std::locale::global(std::locale("en_US.utf8"));
std::wcout.imbue(std::locale());
std::wcout << L"american locale: " << std::showbase
<< std::put_money(mon) << '\n';
std::wcout.imbue(std::locale(std::wcout.getloc(),
new std::moneypunct_byname<wchar_t>("ru_RU.utf8")));
std::wcout << L"american locale with russian moneypunct: "
<< std::put_money(mon) << '\n';
}