cplusplus
.com
教程
參考
文章
論壇
C++
教程
參考
文章
論壇
參考
C 庫
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
C++11
<cfenv> (fenv.h)
<cfloat> (float.h)
C++11
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
C++11
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
C++11
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
C++11
<ctgmath> (tgmath.h)
<ctime> (time.h)
C++11
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
容器
C++11
<array>
<deque>
C++11
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
C++11
<unordered_map>
C++11
<unordered_set>
<vector>
輸入/輸出
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
多執行緒
C++11
<atomic>
C++11
<condition_variable>
C++11
<future>
C++11
<mutex>
C++11
<thread>
其他
<algorithm>
<bitset>
C++11
<chrono>
C++11
<codecvt>
<complex>
<exception>
<functional>
C++11
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
C++11
<random>
C++11
<ratio>
C++11
<regex>
<stdexcept>
<string>
C++11
<system_error>
C++11
<tuple>
C++11
<type_traits>
C++11
<typeindex>
<typeinfo>
<utility>
<valarray>
<locale>
has_facet
locale
use_facet
C++11
wbuffer_convert
C++11
wstring_convert
函式
isalnum
isalpha
C++11
isblank
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
tolower
toupper
標準刻面
codecvt
codecvt_base
codecvt_byname
collate
collate_byname
ctype
ctype_base
ctype_byname
messages
messages_base
messages_byname
money_base
money_get
money_put
moneypunct
moneypunct_byname
num_get
num_put
numpunct
numpunct_byname
time_base
time_get
time_get_byname
time_put
time_put_byname
參考
<locale>
use_facet
函式模板
<locale>
std::
use_facet
template <class Facet> const Facet& use_facet (const locale& loc);
訪問 locale 的 facet
返回 locale
loc
的 facet
Facet
的引用。
如果 locale 中不存在該 facet,則函式丟擲
bad_cast
異常。
函式
has_facet
可用於在嘗試使用此函式來*使用*特定 facet 之前,檢查 locale 是否具有該 facet。
引數
loc
locale
物件。
模板引數
Facet
應為*facet 型別*。
facet 型別是公開派生(直接或間接)自
locale::facet
且具有型別為
locale::id
的靜態成員
id
的型別,例如標準 facet
collate
、
codecvt
、
ctype
、
messages
、
moneypunct
、
money_get
、
money_put
、
numpunct
、
num_get
、
num_put
、
time_get
和
time_put
。
返回型別
對*facet 物件*的 const 限定引用。
資料競爭
訪問引數
loc
,返回的物件可用於訪問*facet 物件*。
異常安全
強異常保證:
如果丟擲異常,
loc
將不會發生任何更改。
另見
has_facet
檢查 locale 是否具有 facet(函式模板)
locale::facet
Locale facet(public 成員類)