[Clang] Explicit conversion from a class implicitly convertible to `nullptr_t` to `bool`
Currently, only Clang accepts the following example. Godbolt link.
struct CwNullptr {
operator decltype(nullptr)() const { return {}; }
};
[[maybe_unused]] bool b(CwNullptr{});
I guess this example ill-formed per the question in CWG1781. However, Clang hasn't claim having implemented CWG1781 and there doesn't seem a test for this.
@llvm/issue-subscribers-clang-frontend
Author: A. Jiang (frederick-vs-ja)
I guess this example ill-formed per the question in CWG1781. However, Clang hasn't claim having implemented CWG1781 and there doesn't seem a test for this.
Also CC @pinskia.
@frederick-vs-ja I think you have pasted the wrong link for godbolt here
@frederick-vs-ja I think you have pasted the wrong link for godbolt
Emmmm, those are test cases.