http://llvm.org/bugs/show_bug.cgi?id=18781
Bug ID: 18781
Summary: linking fails for constexpr static const char* member
Product: clang
Version: 3.4
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Hi!
$ cat baz.cc
#include <iostream>
struct foo
{
constexpr static const char* me = "foo";
};
int main ()
{
foo f;
std::cerr << f.me << std::endl;
}
$ clang++-mp-3.5 -std=c++11 baz.cc
Undefined symbols for architecture x86_64:
"foo::me", referenced from:
_main in baz-ae302f.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ g++-mp-4.9 -std=c++11 baz.cc
$ ./a.out
foo
Might be related to #18696, I don't know.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs