diff options
-rw-r--r-- | clang/test/SemaCXX/cxx1y-init-captures.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx1y-init-captures.cpp b/clang/test/SemaCXX/cxx1y-init-captures.cpp new file mode 100644 index 00000000000..d737a4ae624 --- /dev/null +++ b/clang/test/SemaCXX/cxx1y-init-captures.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -std=c++1y %s -verify + +// expected-no-diagnostics +namespace variadic_expansion { + void f(int &, char &); + + template <typename ... T> void g(T &... t) { + f([&a(t)]()->decltype(auto) { + return a; + }() ...); + } + + void h(int i, char c) { g(i, c); } +} |