From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id BE6103858D37; Tue, 14 Mar 2023 10:51:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BE6103858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62f.google.com with SMTP id x11so16109086pln.12; Tue, 14 Mar 2023 03:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678791087; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=d5MjL9MgxPa6EL+pm/+6tJgB28b9aQNHBY0YMdFNiXQ=; b=Et57krLUEWAhzkJkgBQgZvgXXEYVf91N8QZ+lZS/EQm+mnKtDl351SD9S5nx2pzib+ 1bQGJa9tvGn6Y5nFsZ+jBCxb2qfRIv48nmpYi6IAhf6gQgKqIF+GikR02EityrasTHll 3oOMMvSsSRmZTQ0tIdx0JNnhbmfF+wT+2G/2Urkh4TaGfWpjjzNo32mL9edpdNIT1kNI LqzCSDL4KJVJKhXJFAlEFWIXWzSk9HEsZAJRxRbzUGm4KYHX+iqxZjsDqujW3aWUQvQT 2hnkhjpc/0HVkQcVeQxdK6wPTPuceeSx2ZRg+tj9y0KIAuIjRuIihQKON2VXeZOFUL4r agrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678791087; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d5MjL9MgxPa6EL+pm/+6tJgB28b9aQNHBY0YMdFNiXQ=; b=nFMSdeL3x34lmUlviYhb+LYOEzkzjyjKY5gbRjtanoA62wp6kc8ij4hzYq9LlPTsM/ fh8h2P2UjUbWhYGCgFWOda+EjmLsAraYSZut8xAJ5uHQHxdUx+G1WbnDEUrc/QMmSiSQ GvXQPKmMJthWsmk3N5kXOdJlO5qHAra/HAERYAULljGJif3ejKTQDU/AzckdnUb1bg3z AJoCDqnz9VE69o2suR0zj6lmGJlrePZtQL9XJ+coJKK0DbUZ1anYzohdccKgT8zQ8aHT vCYelxm2nUEZg6pZQ3rkVtLYfCZ+gIsnPbB19YOAGCKHpdZIeGdaOKZTz/A32bJBXx18 vFKw== X-Gm-Message-State: AO0yUKXoaH6a/pQABVzywLlqPp5m+SXlpj6ATTdMT5ayWKjMFmzazhUU XJ7dKHObRiSZQiW/w8c8qe5NP/sK8bZqRn40+/0= X-Google-Smtp-Source: AK7set/Jl1iMg6hjOgeLyE92YIUWtqQ0kZQrluZcw+ldc/1drNieICiLQrFAg4S2XlH8Mpqjtk1d53d+AukSNvME1FY= X-Received: by 2002:a17:902:aa46:b0:19f:3081:db3f with SMTP id c6-20020a170902aa4600b0019f3081db3fmr4055742plr.5.1678791087626; Tue, 14 Mar 2023 03:51:27 -0700 (PDT) MIME-Version: 1.0 References: <20230314103040.2697873-1-jwakely@redhat.com> In-Reply-To: <20230314103040.2697873-1-jwakely@redhat.com> From: =?UTF-8?Q?Daniel_Kr=C3=BCgler?= Date: Tue, 14 Mar 2023 11:51:16 +0100 Message-ID: Subject: Re: [committed] libstdc++: Fix preprocessor condition for inline variables To: Jonathan Wakely Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Am Di., 14. M=C3=A4rz 2023 um 11:32 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Tested x86_64-linux. Pushed to trunk. > > -- >8 -- > > 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. > --- > 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/bi= ts/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 > =3D typename enable_if::value, _Tp>::type; > > -#if __cpp_variable_templates > +#if __cplusplus >=3D 201703L > template > inline constexpr bool __is_duration_v =3D false; > template > -- > 2.39.2 Apologies for the late response: What about changing the test to check for __cpp_inline_variables or combining it with __cpp_variable_templates instead? Thanks, - Daniel