diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-05-02 22:23:38 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-05-02 22:23:38 +0100 |
commit | 315f8b5f18dcfcd81401c9629deaf77443fa7c1e (patch) | |
tree | c67f2a13583af00c07f97f877c822185815fe380 /gcc/predict.c | |
parent | b752e2c926065820a0086c7a482edf199d79dfc2 (diff) | |
download | gcc-315f8b5f18dcfcd81401c9629deaf77443fa7c1e.zip gcc-315f8b5f18dcfcd81401c9629deaf77443fa7c1e.tar.gz gcc-315f8b5f18dcfcd81401c9629deaf77443fa7c1e.tar.bz2 |
PR libstdc++/90314 fix non-equivalent declarations of std::swap
In order to use the _GLIBCXX_NOEXCEPT_IF macro for an expression
containing commas I enclosed it in parentheses, so the preprocessor
wouldn't treat it as two arguments to the function-like macro. Clang
gives an error because now the noexcept-specifier noexcept((C)) is not
equivalent to the noexcept(C) one on the declaration of swap in
<type_traits>.
Instead of requiring extra parentheses around the expression, redefine
_GLIBCXX_NOEXCEPT_IF as a variadic macro (even though supporting that in
C++98 is a GNU extension).
PR libstdc++/90314
* include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
* include/bits/move.h (swap): Remove extra parentheses.
From-SVN: r270827
Diffstat (limited to 'gcc/predict.c')
0 files changed, 0 insertions, 0 deletions