libstdc++: Fix redefinition error in std::tuple [PR108822]
commit1e88a151f878e0a139bf55eb0cee2506fb903274
authorJonathan Wakely <jwakely@redhat.com>
Mon, 15 Jan 2024 16:51:39 +0000 (15 16:51 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 15 Jan 2024 17:18:53 +0000 (15 17:18 +0000)
treea258e02df3f15562d187c018373499a1e944e585
parent6c703b4eb68cbc32de1d62e5b573cb1b9857af29
libstdc++: Fix redefinition error in std::tuple [PR108822]

When using a compiler that doesn't define __cpp_conditional_explicit
there's a redefinition error for tuple::__nothrow_assignable. This is
because it's defined in different places for the pre-C++20 and C++20
implementations, which are controled by different preprocessor
conditions. For certain combinations of C++20 feature test macros it's
possible for both __nothrow_assignable definitions to be in scope.

Move the pre-C++20 __assignable and __nothrow_assignable definitions adjacent to
their use, so that only one set of definitions is visible for any given
set of feature test macros.

libstdc++-v3/ChangeLog:

PR libstdc++/108822
* include/std/tuple (__assignable, __is_nothrow_assignable):
Move pre-C++20 definitions adjacent to their use.
libstdc++-v3/include/std/tuple