[libcxx-commits] [libcxx] [libc++][format] Discard contents since null-terminator in character arrays in formatting (PR #116571)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 22 01:09:29 PST 2025


================
@@ -32,6 +33,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace __format {
 
+template <class _Arr, class _Elem>
+inline constexpr bool __is_bounded_array_of = false;
+
+template <class _Elem, size_t _Len>
+inline constexpr bool __is_bounded_array_of<_Elem[_Len], _Elem> = true;
+
----------------
frederick-vs-ja wrote:

I roughly remember that the old form was related to something weird (possibly for the `T[0]` extension), so I added the new internal trait.

https://github.com/llvm/llvm-project/pull/116571


More information about the libcxx-commits mailing list