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 ESMTPS id 9AF283841893 for ; Mon, 27 Jun 2022 10:17:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9AF283841893 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-466-r6DNaZQbNE2lZ9tahrATAg-1; Mon, 27 Jun 2022 06:17:08 -0400 X-MC-Unique: r6DNaZQbNE2lZ9tahrATAg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D2FF1804194; Mon, 27 Jun 2022 10:17:07 +0000 (UTC) Received: from localhost (unknown [10.33.36.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E3FF1415108; Mon, 27 Jun 2022 10:17:07 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Simplify fs::path construction using variable template Date: Mon, 27 Jun 2022 11:17:07 +0100 Message-Id: <20220627101707.33885-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 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_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Mon, 27 Jun 2022 10:17:10 -0000 Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/fs_path.h (__is_path_iter_src): Replace class template with variable template. --- libstdc++-v3/include/bits/fs_path.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libstdc++-v3/include/bits/fs_path.h b/libstdc++-v3/include/bits/fs_path.h index d6202fd275a..6e7b366d104 100644 --- a/libstdc++-v3/include/bits/fs_path.h +++ b/libstdc++-v3/include/bits/fs_path.h @@ -102,19 +102,16 @@ namespace __detail #endif template - struct __is_path_iter_src - : false_type - { }; + inline constexpr bool __is_path_iter_src = false; template - struct __is_path_iter_src<_Iter_traits, - void_t> - : bool_constant<__is_encoded_char> - { }; + inline constexpr bool + __is_path_iter_src<_Iter_traits, void_t> + = __is_encoded_char; template inline constexpr bool __is_path_src - = __is_path_iter_src>>::value; + = __is_path_iter_src>>; template<> inline constexpr bool __is_path_src = false; @@ -150,7 +147,7 @@ namespace __detail // SFINAE constraint for InputIterator parameters as required by [fs.req]. template> - using _Path2 = enable_if_t<__is_path_iter_src<_Tr>::value, path>; + using _Path2 = enable_if_t<__is_path_iter_src<_Tr>, path>; #if __cpp_lib_concepts template -- 2.36.1