Only qualify function as constexpr for C++14 and later
authorJonathan Wakely <jwakely@redhat.com>
Wed, 23 Oct 2019 16:14:50 +0000 (17:14 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 23 Oct 2019 16:14:50 +0000 (17:14 +0100)
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
libstdc++-v3/include/debug/helper_functions.h

index 55ad108aca8e1e669641d474bb160ea7eee111ae..277fd01eccfdba0465a3eb5546d9c7891432f0ff 100644 (file)
@@ -1,5 +1,8 @@
 2019-10-23  Jonathan Wakely  <jwakely@redhat.com>
 
+       * 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.
 
index 5a920bb9a6f3a329f05a795b35d937ea94c06295..c3e7478f649d2348a6418e3868cc48b9aca0327c 100644 (file)
@@ -221,7 +221,7 @@ namespace __gnu_debug
 #endif
 
   template<typename _InputIterator>
-    _GLIBCXX_CONSTEXPR
+    _GLIBCXX14_CONSTEXPR
     inline bool
     __valid_range(_InputIterator __first, _InputIterator __last)
     {