[LLVMbugs] [Bug 19373] New: clang erroneously enforcing alias template parameter kind
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Apr 8 13:23:28 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19373
Bug ID: 19373
Summary: clang erroneously enforcing alias template parameter
kind
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: eric at boostpro.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Gcc 4.8.2 accepts the following code. I think it's legal, but I'm far from
certain.
///////////////////////////////////////
template<typename T, typename...Us>
using X = T;
template<template<typename...> class T>
struct S
{
template<typename...Us>
using X = T<Us...>;
};
int main()
{
S<X>::X<int, char *> i = 0;
}
///////////////////////////////////////
Result:
test.cpp:8:17: error: pack expansion used as argument for non-pack parameter of
alias template
using X = T<Us...>;
^~~~~
test.cpp:13:5: note: in instantiation of template class 'S<X>' requested here
S<X>::X<int, char *> i = 0;
^
test.cpp:1:19: note: template parameter is declared here
template<typename T, typename...Us>
^
--
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/20140408/3247858a/attachment.html>
More information about the llvm-bugs
mailing list