From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 2088438582A3; Fri, 5 Aug 2022 14:18:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2088438582A3 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 r13-1977] libstdc++: Add feature test macro for X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 29fc5075d7e1dd018599fc391eea4259ef5e4b6c X-Git-Newrev: 58a644cfdee53275e3d07eff0c2126dc88b87aef Message-Id: <20220805141844.2088438582A3@sourceware.org> Date: Fri, 5 Aug 2022 14:18:44 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2022 14:18:44 -0000 https://gcc.gnu.org/g:58a644cfdee53275e3d07eff0c2126dc88b87aef commit r13-1977-g58a644cfdee53275e3d07eff0c2126dc88b87aef Author: Jonathan Wakely Date: Fri Aug 5 15:17:20 2022 +0100 libstdc++: Add feature test macro for libstdc++-v3/ChangeLog: * include/experimental/scope (__cpp_lib_experimental_scope): Define. * testsuite/experimental/scopeguard/uniqueres.cc: Check macro. Diff: --- libstdc++-v3/include/experimental/scope | 2 ++ libstdc++-v3/testsuite/experimental/scopeguard/uniqueres.cc | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/libstdc++-v3/include/experimental/scope b/libstdc++-v3/include/experimental/scope index 37a57b38af7..208fadc513e 100644 --- a/libstdc++-v3/include/experimental/scope +++ b/libstdc++-v3/include/experimental/scope @@ -43,6 +43,8 @@ namespace std _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION namespace experimental::inline fundamentals_v3 { +#define __cpp_lib_experimental_scope 201902 + template concept __not_same_as = !same_as<_Tp, _Up>; diff --git a/libstdc++-v3/testsuite/experimental/scopeguard/uniqueres.cc b/libstdc++-v3/testsuite/experimental/scopeguard/uniqueres.cc index 7690572ab19..fe9d6ee7cfc 100644 --- a/libstdc++-v3/testsuite/experimental/scopeguard/uniqueres.cc +++ b/libstdc++-v3/testsuite/experimental/scopeguard/uniqueres.cc @@ -4,6 +4,12 @@ #include #include +#ifndef __cpp_lib_experimental_scope +# error Feature-test macro is not defined. +#elif __cpp_lib_experimental_scope < 201902 +# error Feature-test macro has bad value. +#endif + using std::experimental::unique_resource; void