From 30a761c4b5933dcc768fa8d5433f2a3347bcfa8e Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 23 Oct 2019 17:14:50 +0100 Subject: [PATCH] Only qualify function as constexpr for C++14 and later This helper function is not a valid constexpr function in C++11, so should only be marked constexpr for C++14 and later. * include/debug/helper_functions.h (__valid_range): Change _GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR. From-SVN: r277338 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/include/debug/helper_functions.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 55ad108aca8..277fd01eccf 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2019-10-23 Jonathan Wakely + * include/debug/helper_functions.h (__valid_range): Change + _GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR. + * include/ext/throw_allocator.h (throw_allocator_base): Qualify size_t and ptrdiff_t. diff --git a/libstdc++-v3/include/debug/helper_functions.h b/libstdc++-v3/include/debug/helper_functions.h index 5a920bb9a6f..c3e7478f649 100644 --- a/libstdc++-v3/include/debug/helper_functions.h +++ b/libstdc++-v3/include/debug/helper_functions.h @@ -221,7 +221,7 @@ namespace __gnu_debug #endif template - _GLIBCXX_CONSTEXPR + _GLIBCXX14_CONSTEXPR inline bool __valid_range(_InputIterator __first, _InputIterator __last) { -- 2.30.2