<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - constexpr variable must be initialized by a constant expression"
href="https://bugs.llvm.org/show_bug.cgi?id=36349">36349</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>constexpr variable must be initialized by a constant expression
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>weiss@wsoptics.de
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>This is a replication of <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78022">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78022</a>
The following code used to compile with clang-4, but now with clang-5 shows the
same behavior as it does with GCC:
template<typename T>
struct A
{
template<typename... Args>
constexpr A(Args&&...){}
};
struct B : public A<int>
{
using A<int>::A;
};
// Uncommenting the following line makes this file compile.
//constexpr B p{0};
// Commenting the following line makes this file compile.
template<typename>
struct X
{
X()
{
// The following line is fine.
const B b0{0};
// The following line produces an error.
constexpr B b1{0};
}
};
Maybe this is a dup of 36333.</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>