<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:nodakai@gmail.com" title="NODA, Kai <nodakai@gmail.com>"> <span class="fn">NODA, Kai</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - constexpr function ill-formed but error message incorrect"
href="https://bugs.llvm.org/show_bug.cgi?id=18874">bug 18874</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>nodakai@gmail.com
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - constexpr function ill-formed but error message incorrect"
href="https://bugs.llvm.org/show_bug.cgi?id=18874#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - constexpr function ill-formed but error message incorrect"
href="https://bugs.llvm.org/show_bug.cgi?id=18874">bug 18874</a>
from <span class="vcard"><a class="email" href="mailto:nodakai@gmail.com" title="NODA, Kai <nodakai@gmail.com>"> <span class="fn">NODA, Kai</span></a>
</span></b>
<pre>As of today, clang trunk@306691 seems to be producing satisfactory results:
/tmp/i.cpp:17:15: error: constexpr function never produces a constant
expression [-Winvalid-constexpr]
constexpr int func2() {
^
/tmp/i.cpp:18:17: note: non-constexpr constructor 'test' cannot be used in a
constant expression
test<int,3> test1 ;
^
/tmp/i.cpp:4:8: note: declared here
struct test
^
/tmp/i.cpp:27:19: error: constexpr variable 'x' must be initialized by a
constant expression
constexpr int x = func<int>();
^ ~~~~~~~~~~~
/tmp/i.cpp:11:15: note: non-constexpr constructor 'test' cannot be used in a
constant expression
test<T,3> test1 ;
^
/tmp/i.cpp:27:23: note: in call to 'func()'
constexpr int x = func<int>();
^
/tmp/i.cpp:4:8: note: declared here
struct test
^
2 errors generated.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>