<div dir="ltr"><div dir="ltr">On Tue, 1 Oct 2019 at 10:42, Michael Price - Dev via cfe-users <<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Should this be ill-formed?<br>
<br>
struct C {<br>
constexpr C() {}<br>
constexpr bool f() const { return true; }<br>
};<br>
constexpr C c{};<br>
<br>
constexpr bool fails_9_0_0(const C* pc, bool (C::*pm)() const) {<br>
return (pc->*pm)();<br>
}<br>
constexpr bool b = fails_9_0_0(&c, &C::f);<br>
<br>
<br>
Clang 9 produces a diagnostic stating “constexpr function never produces a constant expression” for `fails_9_0_0`. Works in Clang 8 as well as GCC and MSVC.<br></blockquote><div><br></div><div>This was also filed as PR43519 and is now fixed in trunk.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
— Michael Price<br>
<br>
Sent from my iPhone<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div></div>