Fixing deprecated C++ API usage with clear maintainer guidance.
The issue involves fixing deprecated C++ API usage in MaybeStackBuffer::ToString() and ToStringView() methods by adding C++20 requires clauses. The fix is localized but requires understanding of C++20 constraints and char_traits deprecation. Maintainer feedback provides clear direction.
In file included from ../../test/cctest/test_util.cc:1:
In file included from ../../src/debug_utils-inl.h:6:
In file included from ../../src/debug_utils.h:6:
In file included from ../../src/async_wrap.h:27:
In file included from ../../src/base_object.h:29:
In file included from ../../src/memory_tracker.h:5:
In file included from ../../deps/v8/include/v8-profiler.h:10:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:950:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/inout_ptr.h:16:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/shared_ptr.h:22:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__fwd/ostream.h:13:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__fwd/string.h:45:41: warning: 'char_traits<unsigned char>' is deprecated: char_traits<T> for T not equ
al to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in a future release, so please migrate off of it. [-Wdeprecated-declarations]
45 | template <class _CharT, class _Traits = char_traits<_CharT>, class _Allocator = allocator<_CharT> >
| ^
../../src/util.h:506:15: note: in instantiation of default argument for 'basic_string<unsigned char>' required here
506 | inline std::basic_string<T> ToString() const { return {out(), length()}; }
| ^~~~~~~~~~~~~~~
../../test/cctest/test_util.cc:229:37: note: in instantiation of template class 'node::MaybeStackBuffer<unsigned char>' requested here
229 | MaybeStackBuffer<unsigned char>
Claim this issue to let others know you're working on it. You'll earn 12 points when you complete it!