class template
<locale>

std::messages

template <class charT> class messages;
Facet to access message catalogs

The messages standard facet is used to read individual strings from a message catalog.

The specifics on how messages are organized in a catalog depend on the library implementation.

The messages class template has a protected destructor: Programs shall only construct objects of derived classes, or use those installed in locale objects (through use_facet).

All standard locale objects support at least the following facet instantiations of the messages class template as part of the messages category:
facets in locale objectsdescription
messages<char>narrow characters
messages<wchar_t>wide characters

Template parameters

charT
Character type.
This is the type of characters for the returned messages.
Aliased as member char_type.

Member types

member typedefinitiondescription
char_typeThe template parameter (charT)Character type
string_typebasic_string<charT>The basic_string instantiation for characters of type charT (such as string for char).
The class also inherits the catalog type from messages_base. This type is a mere alias (typedef) of a signed integer type.

Member constants

The class contains a public static constant of type locale::id that uniquely identifies facets with money_put semantics.

Public member functions


Virtual protected member functionss

The class defines the virtual protected members which implement the behavior by default of their respective public member functions:

Along with the class destructor:

Specializations

At least the following specializations of this template are provided in all library implementations:
specialization
messages<char>
messages<wchar_t>