Home | History | Annotate | Download | only in SemaCXX

Lines Matching refs:Ts

158   template<typename...Ts> bool g(Fst<bool, Ts> ...bools);
159 template<typename...Ts> bool f(Ts &&...ts) {
160 return g<Ts...>([&ts] {
161 if (!ts)
163 --ts;
174 template<typename...Ts> sink(Ts &&...) {}
177 template<typename...Ts> void local_class() {
179 [] (Ts t) {
180 struct S : Ts {
181 void f(Ts t) {
182 Ts &that = *this;
185 Ts g() { return *this; };
190 } (Ts()).g() ...
196 template<typename...Ts> void nested(Ts ...ts) {
198 // Each expansion of this lambda implicitly captures all of 'ts', because
199 // the inner lambda also expands 'ts'.
201 return ts + [&] { return f(ts...); } ();
207 template<typename...Ts> void nested2(Ts ...ts) { // expected-note 2{{here}}
208 // Capture all 'ts', use only one.
209 f([&ts...] { return ts; } ()...);
210 // Capture each 'ts', use it.
211 f([&ts] { return ts; } ()...);
212 // Capture all 'ts', use all of them.
213 f([&ts...] { return (int)f(ts...); } ());
214 // Capture each 'ts', use all of them. Ill-formed. In more detail:
216 // We instantiate two lambdas here; the first captures ts$0, the second
217 // captures ts$1. Both of them reference both ts parameters, so both are
218 // ill-formed because ts can't be implicitly captured.
221 // specify which 'ts' we're referring to in its diagnostic name. We should
224 f([&ts] { return (int)f(ts...); } ()...); // \
225 // expected-error 2{{'ts' cannot be implicitly captured}} \