std::time_put_byname (3) - Linux Manuals
std::time_put_byname: std::time_put_byname
NAME
std::time_put_byname - std::time_put_byname
Synopsis
Defined in header <locale>
template< class CharT, class OutputIterator = std::ostreambuf_iterator<CharT> >
class time_put_byname : public std::time_put<CharT, OutputIterator>;
std::time_put_byname is a std::time_put facet which encapsulates time and date formatting rules of the locale specified at its construction.
Two specializations are provided by the standard library
Defined in header <locale>
std::time_put_byname<char, OutputIterator> narrow/multibyte time formatting
std::time_put_byname<wchar_t, OutputIterator> wide string time formatting
Member types
Member type Definition
char_type CharT
iter_type OutputIterator
Member functions
constructor (public member function)
destructor (protected member function)
std::time_put_byname::time_put_byname
explicit time_put_byname( const char* name, std::size_t refs = 0 );
explicit time_put_byname( const std::string& name, std::size_t refs = 0 ); (since C++11)
Constructs a new std::time_put_byname facet for a locale with name.
refs is used for resource management: if refs == 0, the implementation destroys the facet, when the last std::locale object holding it is destroyed. Otherwise, the object is not destroyed.
Parameters
name - the name of the locale
refs - the number of references that link to the facet
std::time_put_byname::~time_put_byname
protected:
~time_put_byname();
Destroys the facet.
Inherited from std::time_put
Member objects
Member name Type
id (static) std::locale::id
Member functions
put (public member function of std::time_put<CharT,OutputIt>)
Protected member functions
do_put formats date/time and writes to output stream
[virtual]
Example
This example prints current time using the "C" locale with the time_put facet replaced by various time_put_byname facets
// Run this code
Possible output:
See also
time_put (class template)