https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126073
Bug ID: 126073
Summary: std::is_{copy,move}_assignable_v miss checks for type
completeness
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
We don't give the two errors here:
```
#include <type_traits>
struct S;
constexpr bool b1 = std::is_assignable_v<S, S>; // error
constexpr bool b2 = std::is_assignable<S, S>::value; // error
constexpr bool b3 = std::is_copy_assignable_v<S>; // no error
constexpr bool b4 = std::is_copy_assignable<S>::value; // error
constexpr bool b5 = std::is_move_assignable_v<S>; // no error
constexpr bool b6 = std::is_move_assignable<S>::value; // error
```
We're bypassing the __is_complete_or_unbounded check that the class-template
form has. And check_trait_type sees a reference and doesn't look through it so
the !COMPLETE_TYPE_P check passes.