std::chrono::operator<< (std::chrono::month)

来自cppreference.com
< cpp‎ | chrono‎ | month
 
 
日期和时间工具
(C++11)
(C++11)
时钟
(C++20)
                                                  
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
日历
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
时区
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
C 风格日期和时间
 
 
template <class CharT, class Traits>

std::basic_ostream<CharT, Traits>&

operator<<(std::basic_ostream<CharT, Traits>& os, const std::chrono::month& m);
(C++20 起)

!m.ok() ,则等价于 os << unsigned(m) << " is not a valid month"; 。否则,构成用与 os 关联的本地环境确定的,由 m 所表示月份的缩写月名组成的 std::basic_string<CharT> s ,再插入 sos 中。

返回值

os

注意

operator<< 有意为调试使用。用 std::chrono::format 以控制格式。

参阅

(C++20)
为插入格式化可输出到流的 chrono 对象
(函数模板)
按照提供的格式输出 month 到流中
(函数模板)