Issue 161689
Summary explicit conversion functions are incompatible with C++98 not warning in C++20
Labels clang:diagnostics
Assignees
Reporter shafik
    Given:

```cpp
struct HasExplicitConversion {
  explicit operator bool(); 
};
```

Using `-Wc++98-compat` in C+11/14/17 we obtain the following diagnostic:

```console
warning: explicit conversion functions are incompatible with C++98 [-Wc++98-compat]
    2 |   explicit operator bool(); 
      |   ^~~~~~~~
```

but not in C++20. This change came in w/ https://github.com/llvm/llvm-project/commit/76b9027f352a83c13c98820724071c5e3bea6232
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to