<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 1 Jun 2020, at 10:37, Keane, Erich via cfe-dev wrote:</p>
</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">Clang appears to be correct here, parameters in a constexpr function are not themselves constexpr. SO, accessing ‘data’ isn’t legal. I don’t know why the other compilers wouldn’t diagnose this.</p>
</blockquote></div>
<div style="white-space:normal">
<p dir="auto">To elaborate on the rationale here, <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">constexpr</code> has never been meant that the function can <em>only</em> be used as a constant expression.</p>
<p dir="auto">John.</p>
</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">I presume you’re getting this from a case where TrivialOutputMessage’s constructor takes a template parameter (and you’ve over-reduced), but you’d want to do something more like this : <a href="https://godbolt.org/z/uBSWt5" style="color:#777">https://godbolt.org/z/uBSWt5</a><br>
<br>
<br>
From: cfe-dev <cfe-dev-bounces@lists.llvm.org> On Behalf Of Umesh Kalappa via cfe-dev<br>
Sent: Monday, June 1, 2020 7:27 AM<br>
To: cfe-dev@lists.llvm.org Developers <cfe-dev@lists.llvm.org><br>
Subject: [cfe-dev] static_assert : expression is not an integral constant expression<br>
<br>
Hi Everyone,<br>
<br>
For the below sample,<br>
<br>
<a href="https://godbolt.org/z/zugh_5" style="color:#777">https://godbolt.org/z/zugh_5</a><br>
<br>
Clang popping up with an error , not the GCC or any other compiler out there.<br>
<br>
For us, it looks like a frontend issue, that needs a fix.<br>
<br>
Thank you<br>
~Umesh<br>
<br>
[<a href="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" style="color:#777">https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif</a>]<<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:#777">https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail</a>><br>
Virus-free. www.avast.com<<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:#777">https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail</a>></p>
</blockquote><br><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">_______________________________________________<br>
cfe-dev mailing list<br>
cfe-dev@lists.llvm.org<br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" style="color:#777">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></p>
</blockquote></div>
<div style="white-space:normal">
</div>
</div>
</body>
</html>