// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
;
;
;
// A defaulted move constructor for a class X is defined as deleted if X has:
// -- a variant member with a non-trivial corresponding constructor
;
; // expected-error{{would delete}}
;
; // expected-error{{would delete}}
// Note, move constructor is not a candidate because it is deleted.
;
extern DeletedNTVariant3<NonTrivial> ; // expected-error {{no matching}}
extern DeletedNTVariant3<DeletedCopy> ; // expected-error {{no matching}}
// -- a non-static data member of class type M (or array thereof) that cannot be
// copied because overload resolution results in an ambiguity or a function
// that is deleted or inaccessible
;
;
; // expected-error{{would delete}}
;
;
;
;
; // expected-error{{would delete}}
;
; // expected-error{{would delete}}
// It's implied (but not stated) that this should also happen if overload
// resolution fails.
;
; // ok, calls copy ctor
;
; // expected-error{{would delete}}
;
; // expected-error{{would delete}}
// -- a direct or virtual base class B that cannot be moved because overload
// resolution results in an ambiguity or a function that is deleted or
// inaccessible
;
; // expected-error{{would delete}}
;
; // expected-error{{would delete}}
;
; // expected-error{{would delete}}
// -- any direct or virtual base class or non-static data member of a type with
// a destructor that is deleted or inaccessible
;
;
; // expected-error{{would delete}}
;
;
;
extern HasNoAccessDtorBase HNADBa;
HasNoAccessDtorBase ; // expected-error{{implicitly-deleted copy constructor}}
// The restriction on rvalue reference members applies to only the copy
// constructor.
;
;
// -- a non-static data member or direct or virtual base class with a type that
// does not have a move constructor and is not trivially copyable
;
;
; // ok under DR1402
;
;
;