From 72e883e163996b6196b85e5aa8c97189894ddc16 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 1 Oct 2023 08:13:03 -0700 Subject: [PATCH] Diagnose unsupported code unit types --- include/fmt/printf.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/fmt/printf.h b/include/fmt/printf.h index adef6adf837e..d82a1350b0bd 100644 --- a/include/fmt/printf.h +++ b/include/fmt/printf.h @@ -23,6 +23,10 @@ template class basic_printf_context { detail::buffer_appender out_; basic_format_args args_; + static_assert( + std::is_same::value || std::is_same::value, + "Unsupported code unit type."); + public: using char_type = Char; using parse_context_type = basic_format_parse_context;