]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Fix function that can't be constexpr in C++11 (PR 95289)
authorJonathan Wakely <jwakely@redhat.com>
Sat, 23 May 2020 17:29:33 +0000 (18:29 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Sat, 23 May 2020 17:29:33 +0000 (18:29 +0100)
commit3ba391077d41324f6c0585f0ec76be0f44dd5b43
tree7aa0e6391f20b762d7f510e0de398ac11f52823c
parenta3e3e25e58c9500f5f55c255e1e4d05f3bff7458
libstdc++: Fix function that can't be constexpr in C++11 (PR 95289)

The body of this function isn't just a return statement, so it can't be
constexpr until C++14.

Backport from mainline
2020-05-23  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/95289
* include/debug/helper_functions.h (__get_distance): Only declare
as a constexpr function for C++14 and up.
* testsuite/25_algorithms/copy/debug/95289.cc: New test.
libstdc++-v3/ChangeLog
libstdc++-v3/include/debug/helper_functions.h
libstdc++-v3/testsuite/25_algorithms/copy/debug/95289.cc [new file with mode: 0644]
This page took 0.061827 seconds and 6 git commands to generate.