https://bugs.llvm.org/show_bug.cgi?id=36349
Bug ID: 36349
Summary: constexpr variable must be initialized by a constant
expression
Product: clang
Version: 5.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
This is a replication of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78022
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.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs