time_put 类

此模板类描述一个对象来充当区域设置 facet,以便控制时间值向 CharType 类型序列的转换。

template <
   class CharType,
   class OutputIterator = ostreambuf_iterator<CharType>
> class time_put : public locale::facet;

参数

  • CharType
    在程序中用于对字符进行编码的类型。

  • OutputIterator
    供时间放置函数写入其输出结果的迭代器类型。

备注

对于任何区域设置 facet,静态对象 ID 的初始存储值为零。 首次尝试访问其存储值后,将在 id 中存储唯一正值。

构造函数

time_put

time_put 类型的对象的构造函数。

Typedef

char_type

一种类型,此类型用于描述区域设置使用的字符。

iter_type

一种类型,此类型描述输出迭代器。

成员函数

do_put

一种以 CharType 序列的形式输出时间和日期信息的虚拟函数。

put

CharType 的形式输出时间和日期信息。

要求

标头:<locale>

命名空间: std

请参见

参考

<locale>

time_base 类

C++ 标准库中的线程安全