diff options
Diffstat (limited to 'test/SemaCXX/lambda-expressions.cpp')
-rw-r--r-- | test/SemaCXX/lambda-expressions.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/SemaCXX/lambda-expressions.cpp b/test/SemaCXX/lambda-expressions.cpp index e290424..65f4856 100644 --- a/test/SemaCXX/lambda-expressions.cpp +++ b/test/SemaCXX/lambda-expressions.cpp @@ -282,4 +282,19 @@ namespace lambdas_in_NSDMIs { }; L l; } -}
\ No newline at end of file +} + +namespace PR18473 { + template<typename T> void f() { + T t(0); + (void) [=]{ int n = t; }; // expected-error {{deleted}} + } + + template void f<int>(); + struct NoCopy { + NoCopy(int); + NoCopy(const NoCopy &) = delete; // expected-note {{deleted}} + operator int() const; + }; + template void f<NoCopy>(); // expected-note {{instantiation}} +} |