https://bugs.llvm.org/show_bug.cgi?id=37232
Bug ID: 37232
Summary: clang-cl fails on reference to static constexpr member
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
The following fails to link:
template<typename T>
struct A
{
static constexpr int binary = 2;
};
class __declspec(dllimport) Exporter
: public A<int>
{
};
void takeRef(const int& _Args)
{
}
int main()
{
takeRef(A<int>::binary);
return 1;
}
With the message:
simplemain.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static int const A<int> ::binary"
This is a simplification of a smaller failing testcase:
#include <fstream>
#include <memory>
int main()
{
std::make_shared<std::ifstream>("test.txt", std::ios::binary);
return 1;
}
--
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