類模板
<locale>

std::numpunct_byname

template <class charT> class numpunct_byname;
數字標點符Facet

numpunct_byname 標準 facet 過載了 numpunct 的虛成員,以實現其對特定命名 locales 的語義。

它的公有介面與 numpunct 相同,只是它的建構函式接受一個額外的 std_name 引數。

1
explicit numpunct_byname (const char* std_name, size_t refs = 0);
1
2
explicit numpunct_byname (const char* std_name, size_t refs = 0);
explicit numpunct_byname (const string& std_name, size_t refs = 0);

其中 std_name 是一個C locale 的名稱。可用的C locales 取決於系統和庫實現,但至少以下幾種保證在所有實現中都存在:
區域設定名稱描述
"C"最小化的“C” locale(與 locale::classic 相同)
""環境的預設 locale

特化

所有庫實現都至少提供了此模板的以下特化:
特化
numpunct_byname<char>
numpunct_byname<wchar_t>