[LLVMbugs] [Bug 18192] New: accepting the wrong set of non-type template arguments for pointers to members
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Dec 9 10:59:53 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=18192
Bug ID: 18192
Summary: accepting the wrong set of non-type template arguments
for pointers to members
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: richard-llvm at metafoo.co.uk
CC: david.majnemer at gmail.com, dgregor at apple.com,
llvmbugs at cs.uiuc.edu
Classification: Unclassified
Given:
struct A { struct { int n; }; };
template<int A::*> struct X {};
Clang rejects this valid code:
X<&A::n> x;
Clang in C++11 mode accepts this invalid code:
constexpr int A::*p = &A::n;
X<p> x;
(Per 14.3.2/1 bullet 6 and 5.3.1/4, such a template argument must be of the
form & qualified-id.)
--
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/20131209/147f0068/attachment.html>
More information about the llvm-bugs
mailing list