Issue 208994
Summary [Clang] Explicit conversion from a class implicitly convertible to `nullptr_t` to `bool`
Labels clang:frontend, diverges-from:gcc, diverges-from:msvc, diverges-from:edg
Assignees
Reporter frederick-vs-ja
    Currently, only Clang accepts the following example. [Godbolt link](https://godbolt.org/z/fTr49cK9x).
```C++
struct CwNullptr {
 operator decltype(nullptr)() const { return {}; }
};
[[maybe_unused]] bool b(CwNullptr{});
```

I _guess_ this example ill-formed per the question in [CWG1781](https://cplusplus.github.io/CWG/issues/1781.html). However, Clang hasn't claim having implemented CWG1781 and there doesn't seem a test for this.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to