命名空间
变体
操作

std::chrono::operator<<(std::chrono::hh_mm_ss)

来自 cppreference.cn
< cpp‎ | chrono‎ | hh mm ss
 
 
 
 
定义于头文件 <chrono>
template< class CharT, class Traits, class Duration >

std::basic_ostream<CharT, Traits>&
    operator<<( std::basic_ostream<CharT, Traits>& os,

                const std::chrono::hh_mm_ss<Duration>& t );
(自 C++20 起)

t 输出到流 os 中。

等价于 return os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{:L%T}"), hms); 其中 STATICALLY_WIDEN<CharT>("{:L%T}")"{:L%T}",如果 CharTchar,并且 L"{:L%T}",如果 CharTwchar_t

内容

[编辑] 参数

os - 输出流
t - 要输出的一天中的时间

[编辑] 返回值

os

[编辑] 示例

[编辑] 缺陷报告

以下行为更改缺陷报告被追溯应用于先前发布的 C++ 标准。

DR 应用于 已发布行为 正确行为
P2372R3 C++20 默认使用给定的区域设置 需要 L 来使用给定的区域设置

[编辑] 参见

(C++20)
将参数的格式化表示形式存储在新字符串中
(函数模板) [编辑]
hh_mm_ss 的格式化支持
(类模板特化) [编辑]