<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - Rejects-valid: constexpr and explicit default ctor"
href="http://llvm.org/bugs/show_bug.cgi?id=17694">17694</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Rejects-valid: constexpr and explicit default ctor
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>thomas.braun@virtuell-zuhause.de
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Debian clang version 3.4-1~exp1 (trunk) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix
The following code when compiled with
/usr/bin/clang++ -std=c++11 -c -o cpp11-constexpr.o cpp11-constexpr.cpp
is rejected:
###########################
class A
{
public:
constexpr A() = default;
};
int main(int argc, char** argv)
{
constexpr A a;
}
############################
Changing the defaulted ctor to a user provided one, i. e. "constexpr A() {}",
lets clang accept the code.
My interpretation of ยง3.9 10 is that A is in both cases a literal type and both
possibilities should be accepted.
In case I'm wrong, I'd be glad for an answer as current g++ versions accept the
above code.</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>