Namespaces
Variants

std:: formattable

From cppreference.net
헤더에 정의됨 <format>
template < class T, class CharT >

concept formattable = /* formattable_with */ <
std:: remove_reference_t < T > ,
std:: basic_format_context < /* fmt_iter_for */ < CharT > , CharT >

> ;
(1) (C++23부터)
도우미 템플릿
template < class CharT >
using /* fmt_iter_for */ = /* unspecified */ ;
(2) ( 설명 전용* )
template < class T, class Context,

class Formatter =
typename Context :: template
formatter_type < std:: remove_const_t < T >> >
concept /* formattable_with */ =
std:: semiregular < Formatter > &&
requires ( Formatter & f, const Formatter & cf, T && t, Context fc,
std:: basic_format_parse_context <
typename Context :: char_type
> pc ) {
{ f. parse ( pc ) } - > std:: same_as < typename decltype ( pc ) :: iterator > ;
{ cf. format ( t, fc ) } - > std:: same_as < typename Context :: iterator > ;

} ;
(3) ( 설명 전용* )

formattable 개념은 std:: formatter < std:: remove_cvref_t < T > , CharT > BasicFormatter Formatter 요구사항을 충족함을 지정합니다 (단, std:: remove_reference_t < T > 가 const 한정된 경우에 한함).

설명 전용 앨리어스 템플릿 /* fmt_iter_for */ std:: output_iterator < const CharT & > 를 만족하는 지정되지 않은 타입을 생성합니다.

결함 보고서

다음의 동작 변경 결함 보고서들은 이전에 발표된 C++ 표준에 소급 적용되었습니다.

DR 적용 대상 게시된 동작 올바른 동작
LWG 3925 C++23 std::basic_format_context 의 두 번째 템플릿 인수가 제공되지 않았음 제공됨

참고 항목

(C++20)
주어진 타입에 대한 포맷팅 규칙을 정의함
(클래스 템플릿)
주어진 포맷팅 인자 타입과 문자 타입에 대한 포맷팅 연산을 추상화함
(명명된 요구사항)
(C++20)
포맷팅 라이브러리 에서 사용되는 함수들을 정의함
(명명된 요구사항)