Skip to content

Commit

Permalink
fix incompatibilities with c++2a mode in clang
Browse files Browse the repository at this point in the history
  • Loading branch information
christinaa authored and vitaut committed Nov 17, 2018
1 parent 19e0088 commit 16b78ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,12 @@ void basic_buffer<T>::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<char8_t> {
Expand Down

0 comments on commit 16b78ee

Please sign in to comment.