std::formatter<pair-or-tuple>

Header: <format>

The template specialization of std::formatter for the std::pair and std::tuple allows users to convert a pair or a tuple to its textual representation as a collection of elements using formatting functions.

# Declarations

template< class CharT, std::formattable<CharT>... Ts >
struct formatter</*pair-or-tuple*/<Ts...>, CharT>;

(since C++23)

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 3892C++23the formatting of nested tuples was incorrectcorrected

# See also