From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 812843858439; Mon, 18 Mar 2024 14:07:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 812843858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710770823; bh=s87P+6FA5HlXdlg3dLy5VAHt8eZrXe43CMnUpWAdMEc=; h=From:To:Subject:Date:From; b=p9uaMsqgWlJMM1QxXAZiM1oBDzvkQe/Lg/9NclnZQf4HmedUu/B1WJx1EverdU1Wa oiy2lstvVqChnLKMLWdl3WQ0g8SPM3r11EFQQURTdNaEprovARDWSsGcjKeqf1Cpt6 ljJJSCpfTN4Fxu45fD7BiVdYHYPKDQ8aLJ/YClEc= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-10263] libstdc++: Simplify fs::path construction using variable template X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 57eb0358d0e0925f9e5aa282ed7f0274f6ff794e X-Git-Newrev: f3d4e25f4076cb9a829fbe24969dfc4627244bdd Message-Id: <20240318140703.812843858439@sourceware.org> Date: Mon, 18 Mar 2024 14:07:03 +0000 (GMT) List-Id: https://gcc.gnu.org/g:f3d4e25f4076cb9a829fbe24969dfc4627244bdd commit r12-10263-gf3d4e25f4076cb9a829fbe24969dfc4627244bdd Author: Jonathan Wakely Date: Thu Jun 23 18:39:50 2022 +0100 libstdc++: Simplify fs::path construction using variable template libstdc++-v3/ChangeLog: * include/bits/fs_path.h (__is_path_iter_src): Replace class template with variable template. (cherry picked from commit 6177f60d914abcb8520b87ae62658e70a7c13759) Diff: --- 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 1f87414c145..60bfd99995f 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