From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 58A573858427 for ; Sat, 9 Oct 2021 00:14:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 58A573858427 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-96-goumB9B7PtC1PMjzeLemxA-1; Fri, 08 Oct 2021 20:13:57 -0400 X-MC-Unique: goumB9B7PtC1PMjzeLemxA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 55BAE801AA7; Sat, 9 Oct 2021 00:13:56 +0000 (UTC) Received: from localhost (unknown [10.33.37.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 061635C22B; Sat, 9 Oct 2021 00:13:55 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH 4/8] libstdc++: Enable vstring for wchar_t unconditionally [PR98725] Date: Sat, 9 Oct 2021 01:13:47 +0100 Message-Id: <20211009001351.659647-4-jwakely@redhat.com> In-Reply-To: <20211009001351.659647-1-jwakely@redhat.com> References: <20211009001351.659647-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Oct 2021 00:14:01 -0000 None of these vstring specializations depend on libc support for wchar_t, so can be enabled unconditionally now that char_traits is always available. libstdc++-v3/ChangeLog: PR libstdc++/98725 * include/ext/rc_string_base.h [!_GLIBCXX_USE_WCHAR_T] (__rc_string_base): Define member function. * include/ext/vstring.h [!_GLIBCXX_USE_WCHAR_T] (hash<__gnu_cxx::__wvstring>): Define specialization. * include/ext/vstring_fwd.h [!_GLIBCXX_USE_WCHAR_T] (__wvstring) (__wsso_string, __wrc_string): Declare typedefs. --- libstdc++-v3/include/ext/rc_string_base.h | 2 -- libstdc++-v3/include/ext/vstring.h | 2 -- libstdc++-v3/include/ext/vstring_fwd.h | 2 -- 3 files changed, 6 deletions(-) diff --git a/libstdc++-v3/include/ext/rc_string_base.h b/libstdc++-v3/include/ext/rc_string_base.h index 819f52dc914..88cc656448a 100644 --- a/libstdc++-v3/include/ext/rc_string_base.h +++ b/libstdc++-v3/include/ext/rc_string_base.h @@ -719,7 +719,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return false; } -#ifdef _GLIBCXX_USE_WCHAR_T template<> inline bool __rc_string_base, @@ -730,7 +729,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return true; return false; } -#endif _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index db02af18cb1..cb5872a7030 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -2921,7 +2921,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return std::_Hash_impl::hash(__s.data(), __s.length()); } }; -#ifdef _GLIBCXX_USE_WCHAR_T /// std::hash specialization for __wvstring. template<> struct hash<__gnu_cxx::__wvstring> @@ -2932,7 +2931,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return std::_Hash_impl::hash(__s.data(), __s.length() * sizeof(wchar_t)); } }; -#endif /// std::hash specialization for __u16vstring. template<> diff --git a/libstdc++-v3/include/ext/vstring_fwd.h b/libstdc++-v3/include/ext/vstring_fwd.h index 645c328104f..1aa53fdc24a 100644 --- a/libstdc++-v3/include/ext/vstring_fwd.h +++ b/libstdc++-v3/include/ext/vstring_fwd.h @@ -58,13 +58,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __versa_string, std::allocator, __rc_string_base> __rc_string; -#ifdef _GLIBCXX_USE_WCHAR_T typedef __versa_string __wvstring; typedef __wvstring __wsso_string; typedef __versa_string, std::allocator, __rc_string_base> __wrc_string; -#endif #if __cplusplus >= 201103L typedef __versa_string __u16vstring; -- 2.31.1