================ @@ -180,3 +200,64 @@ void f() { } // namespace cwg2881 +namespace cwg2882 { // cwg2882: 2.7 tentatively ready 2024-05-31 +struct C { + operator void() = delete; + // expected-warning@-1 {{conversion function converting 'cwg2882::C' to 'void' will never be used}} + // cxx98-error@-2 {{deleted function definitions are a C++11 extension}} +}; + +void f(C c) { + (void)c; +} +} // namespace cwg2882 + +namespace cwg2883 { // cwg2883: no tentatively ready 2024-05-31 +#if __cplusplus >= 201103L +void f() { + int x; + (void)[&] { + return x; + }; +} +#endif +#if __cplusplus >= 202002L +struct A { + A() = default; + A(const A &) = delete; // #cwg2883-A-copy-ctor + constexpr operator int() { return 42; } +}; +void g() { + constexpr A a; + // FIXME: OK, not odr-usable from a default template argument, and not odr-used + (void)[=]<typename T, int = a> {}; + // since-cxx20-error@-1 {{call to deleted constructor of 'const A'}} + // since-cxx20-note@#cwg2883-A-copy-ctor {{'A' has been explicitly marked deleted here}} +} +#endif +} // namespace cwg2883 ---------------- cor3ntin wrote:
We do emit a diag later https://compiler-explorer.com/z/bd39GcqMP I think it's still fair to say it's not implemented https://github.com/llvm/llvm-project/pull/94167 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits