https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119075
Bug ID: 119075 Summary: LWG4140 seems incompletely implemented Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: de34 at live dot cn Target Milestone: --- As of LWG4140, the following code snippet should be accepted, but libstdc++ is still rejecting it because the private default constructor of std::vector<bool>::reference isn't removed yet. https://godbolt.org/z/3bnaqrreW ``` #include <bitset> #include <vector> #include <type_traits> int test1(std::bitset<42>::reference); void test1(std::enable_if<false>); static_assert(std::is_same<decltype(test1({})), void>::value, ""); int test2(std::vector<bool>::reference); void test2(std::enable_if<false>); static_assert(std::is_same<decltype(test2({})), void>::value, ""); ``` I think the existence of private or delete default constructor is somehow observable, see also LWG3160 (https://cplusplus.github.io/LWG/issue3160).