Namespaces
Variants

std::chrono:: operator<< (std::chrono::year_month_weekday)

From cppreference.net
定義先ヘッダ <chrono>
template < class CharT, class Traits >

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

const std:: chrono :: year_month_weekday & ymwd ) ;
(C++20以降)

ymwd のテキスト表現を os に出力します。以下のように動作します。

os << std:: format ( os. getloc ( ) , STATICALLY_WIDEN < CharT > ( "{}/{:L}/{:L}" ) ,
ymwd. year ( ) , ymwd. month ( ) , ymwd. weekday_indexed ( ) ) ;

CharT char の場合 STATICALLY_WIDEN < CharT > ( "{}/{:L}/{:L}" ) "{}/{:L}/{:L}" となり、 CharT wchar_t の場合 L "{}/{:L}/{:L}" となる。

戻り値

os

不具合報告

以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。

DR 適用対象 公開時の動作 正しい動作
P2372R3 C++20 デフォルトで指定されたロケールが使用されていた L を指定して与えられたロケールを使用する必要がある

関連項目

(C++20)
引数のフォーマットされた表現を新しい文字列に格納する
(関数テンプレート)
year_month_day のフォーマットサポート
(クラステンプレートの特殊化)