[Bug libstdc++/89090] vector.tcc uses "if constexpr" in C++11 mode
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 5 14:45:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89090
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Feb 5 14:44:56 2019
New Revision: 268536
URL: https://gcc.gnu.org/viewcvs?rev=268536&root=gcc&view=rev
Log:
PR libstdc++/89090 avoid C++17 features in C++11/C++14 code
Although GCC and Clang both allow these features pre-C++17 in system
headers, Clang does issue warnings with -Wsystem-headers. It can also
complicate bisection and/or testcase reduction if # line markers are
stripped, because the code won't be known to come from system headers.
PR libstdc++/89090
* include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
parameter unnamed. Add message to static assertion.
* include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
(vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
in C++11 code.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_uninitialized.h
trunk/libstdc++-v3/include/bits/vector.tcc
More information about the Gcc-bugs
mailing list