std::numpunct_byname

Header: <locale>

std::numpunct_byname is a std::numpunct facet which encapsulates numeric punctuation preferences of a locale specified at its construction.

# Declarations

template< class CharT >
class numpunct_byname : public std::numpunct<CharT>;

# Parameters

# Example

#include <iostream>
#include <locale>
 
int main()
{
    const double number = 1000.25;
    std::wcout << L"default locale: " << number << L'\n';
    std::wcout.imbue(std::locale(std::wcout.getloc(),
                                 new std::numpunct_byname<wchar_t>("ru_RU.UTF8")));
    std::wcout << L"default locale with russian numpunct: " << number << L'\n';
}

# See also