Make char8_t a strongly-typed enum

This commit is contained in:
Victor Zverovich
2018-09-29 16:25:02 -07:00
parent 66992e90d2
commit e4fea22d15
3 changed files with 9 additions and 14 deletions

View File

@@ -437,12 +437,7 @@ void basic_buffer<T>::append(const U *begin, const U *end) {
} // namespace internal
// A UTF-8 code unit type.
struct char8_t {
char value;
FMT_CONSTEXPR FMT_EXPLICIT operator bool() const FMT_NOEXCEPT {
return value != 0;
}
};
enum char8_t: unsigned char {};
// A UTF-8 string view.
class u8string_view : public basic_string_view<char8_t> {