r270827 - in /trunk/libstdc++-v3: ChangeLog inc...

redi@gcc.gnu.org redi@gcc.gnu.org
Thu May 2 21:23:00 GMT 2019


Author: redi
Date: Thu May  2 21:23:38 2019
New Revision: 270827

URL: https://gcc.gnu.org/viewcvs?rev=270827&root=gcc&view=rev
Log:
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.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/c++config
    trunk/libstdc++-v3/include/bits/move.h



More information about the Libstdc++-cvs mailing list