https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95289
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:3ba391077d41324f6c0585f0ec76be0f44dd5b43 commit r10-8172-g3ba391077d41324f6c0585f0ec76be0f44dd5b43 Author: Jonathan Wakely <jwak...@redhat.com> Date: Sat May 23 18:29:33 2020 +0100 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 <jwak...@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.