https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91592
Bug ID: 91592 Summary: `__is_assignable` fails for private assignment operators in certain contexts Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blelbach at cct dot lsu.edu Target Milestone: --- This code fails with GCC 8.2 and GCC trunk. https://godbolt.org/z/IljfIw ``` class B { B& operator=(const B&); }; static_assert(!__is_assignable(B&, B const&), ""); // Ok. void foo() { static_assert(!__is_assignable(B&, B const&), ""); // FAIL. } ``` MSVC, Clang and EDG all accept this code.