[LLVMbugs] [Bug 19182] New: Can't use constexpr function-pointer member as non-type template parameter
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Mar 18 15:34:37 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19182
Bug ID: 19182
Summary: Can't use constexpr function-pointer member as
non-type template parameter
Product: clang
Version: 3.4
Hardware: PC
OS: All
Status: NEW
Severity: release blocker
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: coder0xff+llvm_org_bugs at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following code does not compile (though it should, and does using gcc):
////////////////
typedef int (*t)();
template<t ptr>
class A {
public:
static constexpr t a = ptr;
};
int f() { return 0; }
class B : public A<&f> {
};
template<typename u>
class C : public A<u::a> {
};
C<B> dummy;
///////////////
$ clang++ -std=c++11 clang_test.cpp
clang_test.cpp:16:20 error: non-type template argument for template parameter
of pointer type 't' (aka 'int (*)()') must have its address taken
class C : public A<u::a> {
^
This bug occurs in at least 3.3 and 3.4, on OSX and Ubuntu.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140318/1f1d34b1/attachment.html>
More information about the llvm-bugs
mailing list