From 16b78ee629b81425df96dc4c1a6ccf6ecf6c1fbe Mon Sep 17 00:00:00 2001 From: christinaa Date: Sat, 17 Nov 2018 03:15:55 +0000 Subject: [PATCH] fix incompatibilities with c++2a mode in clang --- include/fmt/format.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/fmt/format.h b/include/fmt/format.h index d743e4da..f045b0c9 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -400,8 +400,12 @@ void basic_buffer::append(const U *begin, const U *end) { } } // namespace internal +// C++20 feature test, since r346892 Clang considers char8_t a fundamental +// type in this mode. If this is the case __cpp_char8_t will be defined. +#if !defined(__cpp_char8_t) // A UTF-8 code unit type. enum char8_t: unsigned char {}; +#endif // A UTF-8 string view. class u8string_view : public basic_string_view {