[LLVMbugs] [Bug 24176] New: Unexpected instantiation when using type-alias and sizeof...
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jul 18 03:21:04 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24176
Bug ID: 24176
Summary: Unexpected instantiation when using type-alias and
sizeof...
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: tomasz.miasko at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang incorrectly decides to instantiate array<1> in a following code:
template<int S>
struct array {
static_assert(S != 1);
};
template<typename... Ts>
using array_u = array<sizeof...(Ts)>;
template <typename ...Ts>
void f()
{
array_u<Ts...> a1;
}
This results in following error message:
a.C:3:3: error: static_assert failed
static_assert(S != 1);
^ ~~~~~~
a.C:12:18: note: in instantiation of template class 'array<1>' requested here
array_u<Ts...> a1;
^
1 error generated.
--
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/20150718/3ecb6a1b/attachment.html>
More information about the llvm-bugs
mailing list