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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs