From: redi Date: Wed, 23 Oct 2019 16:14:50 +0000 (+0000) Subject: Only qualify function as constexpr for C++14 and later X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=927d1cbf75e83748def42eb1de13a43c3fe157c8;p=thirdparty%2Fgcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277338 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 55ad108aca8e..277fd01eccfd 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 5a920bb9a6f3..c3e7478f649d 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) {