mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 09:32:20 +00:00
b2997f579a
This permits an init-capture to introduce a new pack: template<typename ...T> auto x = [...a = T()] { /* a is a pack */ }; To support this, the mechanism for allowing ParmVarDecls to be packs has been extended to support arbitrary local VarDecls. llvm-svn: 361300
14 lines
267 B
C++
14 lines
267 B
C++
// RUN: %clang_cc1 -std=c++11 -verify %s
|
|
|
|
template<int &...Ns> int f() {
|
|
return sizeof...(Ns);
|
|
}
|
|
template int f<>();
|
|
|
|
template<typename ...T> int g() {
|
|
return [...x = T()] { // expected-warning 2{{extension}}
|
|
return sizeof...(x);
|
|
}();
|
|
}
|
|
template int g<>();
|