ChangeLog
118 KB
-
PR libstdc++/90314 fix non-equivalent declarations of std::swap · 315f8b5f
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
Jonathan Wakely committed