File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3850,15 +3850,15 @@ constexpr auto format_as(Enum e) noexcept -> underlying_t<Enum> {
38503850} // namespace enums
38513851
38523852#ifdef __cpp_lib_byte
3853- template <> struct formatter <std::byte> : formatter<unsigned > {
3854- static auto format_as (std::byte b) -> unsigned char {
3855- return static_cast <unsigned char >(b);
3856- }
3857- template <typename Context>
3858- auto format (std::byte b, Context& ctx) const -> decltype(ctx.out()) {
3859- return formatter<unsigned >::format (format_as (b), ctx);
3860- }
3861- };
3853+ // template <> struct formatter<std::byte> : formatter<unsigned> {
3854+ // static auto format_as(std::byte b) -> unsigned char {
3855+ // return static_cast<unsigned char>(b);
3856+ // }
3857+ // template <typename Context>
3858+ // auto format(std::byte b, Context& ctx) const -> decltype(ctx.out()) {
3859+ // return formatter<unsigned>::format(format_as(b), ctx);
3860+ // }
3861+ // };
38623862#endif
38633863
38643864struct bytes {
@@ -4231,6 +4231,13 @@ FMT_NODISCARD auto to_string(const T& value) -> std::string {
42314231FMT_END_EXPORT
42324232FMT_END_NAMESPACE
42334233
4234+ namespace std {
4235+ template <typename T, FMT_ENABLE_IF (std::is_same<T, std::byte>::value)>
4236+ inline auto format_as (T b) -> unsigned char {
4237+ return static_cast <unsigned char >(b);
4238+ }
4239+ } // namespace std
4240+
42344241#ifdef FMT_HEADER_ONLY
42354242# define FMT_FUNC inline
42364243# include " format-inl.h"
You can’t perform that action at this time.
0 commit comments