diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-04-05 01:46:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-05 01:46:13 -0400 |
| commit | 0cd31fc7ff157551cfbba5da35cd79f118d2a2e3 (patch) | |
| tree | a308488f5d85184c8ec402fb3f55f1cf2704443e /lib/libcxx/include/__format/formatter_integer.h | |
| parent | 8acedfd5baabab705946ad097746f9183ef62420 (diff) | |
| parent | cefe65c1b8abe65a22d4b68410db1be264fdeda0 (diff) | |
| download | zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.tar.gz zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.zip | |
Merge pull request #22780 from ziglang/llvm20
LLVM 20
Diffstat (limited to 'lib/libcxx/include/__format/formatter_integer.h')
| -rw-r--r-- | lib/libcxx/include/__format/formatter_integer.h | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/lib/libcxx/include/__format/formatter_integer.h b/lib/libcxx/include/__format/formatter_integer.h index 41400f0047..3f51b10d75 100644 --- a/lib/libcxx/include/__format/formatter_integer.h +++ b/lib/libcxx/include/__format/formatter_integer.h @@ -67,7 +67,7 @@ template <__fmt_char_type _CharT> struct _LIBCPP_TEMPLATE_VIS formatter<long, _CharT> : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> struct _LIBCPP_TEMPLATE_VIS formatter<long long, _CharT> : public __formatter_integer<_CharT> {}; -# ifndef _LIBCPP_HAS_NO_INT128 +# if _LIBCPP_HAS_INT128 template <__fmt_char_type _CharT> struct _LIBCPP_TEMPLATE_VIS formatter<__int128_t, _CharT> : public __formatter_integer<_CharT> {}; # endif @@ -83,12 +83,43 @@ template <__fmt_char_type _CharT> struct _LIBCPP_TEMPLATE_VIS formatter<unsigned long, _CharT> : public __formatter_integer<_CharT> {}; template <__fmt_char_type _CharT> struct _LIBCPP_TEMPLATE_VIS formatter<unsigned long long, _CharT> : public __formatter_integer<_CharT> {}; -# ifndef _LIBCPP_HAS_NO_INT128 +# if _LIBCPP_HAS_INT128 template <__fmt_char_type _CharT> struct _LIBCPP_TEMPLATE_VIS formatter<__uint128_t, _CharT> : public __formatter_integer<_CharT> {}; # endif -#endif //_LIBCPP_STD_VER >= 20 +# if _LIBCPP_STD_VER >= 23 +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<signed char> = true; +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<short> = true; +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<int> = true; +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<long> = true; +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<long long> = true; +# if _LIBCPP_HAS_INT128 +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<__int128_t> = true; +# endif + +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<unsigned char> = true; +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<unsigned short> = true; +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<unsigned> = true; +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<unsigned long> = true; +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<unsigned long long> = true; +# if _LIBCPP_HAS_INT128 +template <> +inline constexpr bool enable_nonlocking_formatter_optimization<__uint128_t> = true; +# endif +# endif // _LIBCPP_STD_VER >= 23 +#endif // _LIBCPP_STD_VER >= 20 _LIBCPP_END_NAMESPACE_STD |
