Files
cppdraft_translate/cppdraft/locale/global/templates.md
2025-10-25 03:02:53 +03:00

1.6 KiB

[locale.global.templates]

28 Text processing library [text]

28.3 Localization library [localization]

28.3.3 Locales [locales]

28.3.3.2 locale globals [locale.global.templates]

🔗

template<class Facet> const Facet& use_facet(const locale& loc);

1

#

Mandates: Facet is a facet class whose definition contains the public static member id as defined in [locale.facet].

2

#

Returns: A reference to the corresponding facet of loc, if present.

3

#

Throws: bad_cast if has_facet(loc) is false.

4

#

Remarks: The reference returned remains valid at least as long as any copy of loc exists.

🔗

template<class Facet> bool has_facet(const locale& loc) noexcept;

5

#

Returns: true if the facet requested is present in loc; otherwise false.