From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id E2B223858C33; Tue, 14 Mar 2023 10:28:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2B223858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678789738; bh=r2UpC4ftT6IFxoyWblHOwbcjNHfO+pBlWoyJz2qLoYA=; h=From:To:Subject:Date:From; b=Cs5VGRZyyIZQ83TGCcaOij3F65+6RH1Nf2h8rtxyuXlr5VHZq0GC9zWwVPYpvV3w7 HHcL9Ily9NOdkOKSN+feHSAwXr6e1qNxy7DlaK5jEo/PyI+48Q9ILJPwdwfZolYKCW XeQzb0Woj4UA5XLgqjyr4BRgNNge+7h1JPrPFyCg= 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-6658] libstdc++: Fix preprocessor condition for inline variables X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: f50f55b8fa9bbce91fc4a56c8c1cac614520d0b4 X-Git-Newrev: 4d771291f70dab571e7c18f9f5f8af4f27737244 Message-Id: <20230314102858.E2B223858C33@sourceware.org> Date: Tue, 14 Mar 2023 10:28:58 +0000 (GMT) List-Id: https://gcc.gnu.org/g:4d771291f70dab571e7c18f9f5f8af4f27737244 commit r13-6658-g4d771291f70dab571e7c18f9f5f8af4f27737244 Author: Jonathan Wakely Date: Thu Mar 9 15:04:45 2023 +0000 libstdc++: Fix preprocessor condition for inline variables Although variable templates are valid in C++14, inline ones aren't. These are only used in C++17 (or later) code, so they don't need to be defined for C++14. libstdc++-v3/ChangeLog: * include/bits/chrono.h (__is_duration_v, __is_time_point_v): Only define for C++17 and later. Diff: --- libstdc++-v3/include/bits/chrono.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/chrono.h b/libstdc++-v3/include/bits/chrono.h index b2e4f4c33a8..fb99fe5eed7 100644 --- a/libstdc++-v3/include/bits/chrono.h +++ b/libstdc++-v3/include/bits/chrono.h @@ -244,7 +244,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION using __disable_if_is_duration = typename enable_if::value, _Tp>::type; -#if __cpp_variable_templates +#if __cplusplus >= 201703L template inline constexpr bool __is_duration_v = false; template