1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 void fn() = default; // expected-error {{only special member}}
5 void fn() = default; // expected-error {{only special member}}
8 foo(const foo&) = default;
10 foo& operator = (const foo&) = default;
11 foo& operator = (foo&) = default;
19 bar& operator = (const bar&);
20 bar& operator = (bar&);
25 bar::bar(const bar&) = default;
26 bar::bar(bar&) = default;
27 bar& bar::operator = (const bar&) = default;
28 bar& bar::operator = (bar&) = default;
29 bar::~bar() = default;
31 // FIXME: static_assert(__is_trivial(foo), "foo should be trivial");
33 static_assert(!__has_trivial_destructor(bar), "bar's destructor isn't trivial");
34 static_assert(!__has_trivial_constructor(bar),
35 "bar's default constructor isn't trivial");
36 static_assert(!__has_trivial_copy(bar), "bar has no trivial copy");
37 static_assert(!__has_trivial_assign(bar), "bar has no trivial assign");