Skip to content

Commit

Permalink
Diagnose unsupported code unit types
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Oct 1, 2023
1 parent b3bf23f commit 72e883e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/fmt/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ template <typename Char> class basic_printf_context {
detail::buffer_appender<Char> out_;
basic_format_args<basic_printf_context> args_;

static_assert(
std::is_same<Char, char>::value || std::is_same<Char, wchar_t>::value,
"Unsupported code unit type.");

public:
using char_type = Char;
using parse_context_type = basic_format_parse_context<Char>;
Expand Down

0 comments on commit 72e883e

Please sign in to comment.