From 20ff570db1c9a7cc8fce50e17bbfa6af668f86d5 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Mon, 12 Feb 2024 19:56:10 -0800 Subject: vr: avoid missing std::char_traits In newer versions of libc++, std::char_traits is only defined for character types (and not const/volatile-qualified character types). See https://discourse.llvm.org/t/deprecating-std-string-t-for-non-character-t/66779. Remove the cv qualifiers from CharT first. Keep qualifiers on value_type and typedefs derived from it. This library appears to be unused (see b/253514421#comment11), but it still builds with a "checkbuild", so it blocks the libc++ update (b/175635923). Bug: 175635923 Test: make checkbuild Test: m MODULES-IN-frameworks-native-libs-vr Test: /data/nativetest64/pdx_tests/pdx_tests Change-Id: I2bfa04ccd073f8701597be8618bb8b48eb695afe --- libs/vr/libpdx/private/pdx/rpc/string_wrapper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vr/libpdx/private/pdx/rpc/string_wrapper.h b/libs/vr/libpdx/private/pdx/rpc/string_wrapper.h index 2d0a4ea6ec..371ed89fc9 100644 --- a/libs/vr/libpdx/private/pdx/rpc/string_wrapper.h +++ b/libs/vr/libpdx/private/pdx/rpc/string_wrapper.h @@ -17,12 +17,12 @@ namespace rpc { // C strings more efficient by avoiding unnecessary copies when remote method // signatures specify std::basic_string arguments or return values. template > + typename Traits = std::char_traits>> class StringWrapper { public: // Define types in the style of STL strings to support STL operators. typedef Traits traits_type; - typedef typename Traits::char_type value_type; + typedef CharT value_type; typedef std::size_t size_type; typedef value_type& reference; typedef const value_type& const_reference; -- cgit v1.2.3-59-g8ed1b