Fix formatting of std::byte via format_as

This commit is contained in:
Victor Zverovich
2022-03-26 09:01:30 -07:00
parent 1c83eaf75e
commit db5b8993ac
3 changed files with 14 additions and 7 deletions
-6
View File
@@ -34,7 +34,6 @@
#define FMT_FORMAT_H_
#include <cmath> // std::signbit
#include <cstddef> // std::byte
#include <cstdint> // uint32_t
#include <cstring> // std::memcpy
#include <limits> // std::numeric_limits
@@ -2997,11 +2996,6 @@ constexpr auto format_as(Enum e) noexcept -> underlying_t<Enum> {
}
} // namespace enums
#ifdef __cpp_lib_byte
inline auto format_as(std::byte b) -> unsigned char { return underlying(b); }
FMT_FORMAT_AS(std::byte, unsigned char);
#endif
class bytes {
private:
string_view data_;