public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6658] libstdc++: Fix preprocessor condition for inline variables
@ 2023-03-14 10:28 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2023-03-14 10:28 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:4d771291f70dab571e7c18f9f5f8af4f27737244
commit r13-6658-g4d771291f70dab571e7c18f9f5f8af4f27737244
Author: Jonathan Wakely <jwakely@redhat.com>
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<!__is_duration<_Tp>::value, _Tp>::type;
-#if __cpp_variable_templates
+#if __cplusplus >= 201703L
template<typename _Tp>
inline constexpr bool __is_duration_v = false;
template<typename _Rep, typename _Period>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-14 10:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 10:28 [gcc r13-6658] libstdc++: Fix preprocessor condition for inline variables Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).