]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR libstdc++/89090 avoid C++17 features in C++11/C++14 code
authorJonathan Wakely <jwakely@redhat.com>
Tue, 5 Feb 2019 14:44:56 +0000 (14:44 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 5 Feb 2019 14:44:56 +0000 (14:44 +0000)
commit2781287255a16b6f2db18c68d02c3f40004332a7
tree63071e5f3fce4b2d7b749df5647e2a331a5c5a6a
parente4b52fcaf50dadbed3ebd0e8e9805a61644231e2
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.

From-SVN: r268536
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_uninitialized.h
libstdc++-v3/include/bits/vector.tcc