================
@@ -430,3 +434,15 @@ void ctad_test() {
CTAD t = s; // expected-warning {{class template argument deduction is
incompatible with C++ standards before C++17}}
}
#endif
+
+namespace GH161702 {
+struct S {
+ enum E { A };
+ using E::A; // expected-warning {{enumeration type in nested name specifier
is incompatible with C++98}}
+#ifndef CXX20COMPAT
----------------
zygoloid wrote:
I think this was just an oversight -- that change also added a distinct
compatibility warning for `explicit(bool)`, and was probably trying to avoid
issuing two warnings for the same thing by disabling the existing warning in
C++20 mode, but went too far. Disabling the `explicit` conversion function
warning in the case of `explicit(bool)` is probably the right thing to do
instead of disabling it in C++20.
https://github.com/llvm/llvm-project/pull/161277
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits