has_facet
描述 (Description)
它用于检查区域设置是否具有构面并返回构造区域中是否存在构面构面。
声明 (Declaration)
以下是std :: has_facet的声明。
C++98
template <class Facet> bool has_facet (const locale& loc) throw();
C++11
template <class Facet> bool has_facet (const locale& loc) noexcept;
参数 (Parameters)
loc - 它是一个语言环境对象。
返回值 (Return Value)
它返回facet Facet是否存在于locale loc中。
异常 (Exceptions)
No-throw guarantee - 此函数永远不会抛出异常。
数据竞争 (Data races)
它已通过Argument loc访问,返回的对象可用于访问facet对象。