1 // RUN: %clang_cc1 -fsyntax-only -std=c++1z %s -verify
4 NonCopyable(const NonCopyable
&) = delete; //expected-note3{{explicitly marked deleted here}}
7 auto L
= [this] { return x
; };
8 const auto &M
= [*this] { return x
; };//expected-error{{call to deleted}}
9 const auto &M2
= [this] () -> auto&& {
11 return [*this] { //expected-error{{call to deleted}} expected-warning{{reference to local}}
12 return ++x
; //expected-error{{read-only}}
15 const auto &M3
= [*this] () mutable -> auto&& { //expected-error{{call to deleted}}
17 return [this] { // expected-warning{{reference to local}}