Lines Matching +full:union +full:- +full:value
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
10 union u {
13 union u2 {
20 union static_data_member {
25 union bad {
26 int &i; // expected-error {{union member 'i' has reference type 'int &'}}
30 union {
37 union TemplateCtorMember { TemplateCtor s; };
51 union disable_dtor {
71 union { T value; }; member
75 optional(U &&...u) : has(true), value(forward<U>(u)...) {} in optional()
78 if (has) new (&value) T(o.value); in optional()
81 if (has) new (&value) T(move(o.value)); in optional()
87 value = o.value; in operator =()
89 value.~T(); in operator =()
91 new (&value) T(o.value); in operator =()
98 value = move(o.value); in operator =()
100 value.~T(); in operator =()
102 new (&value) T(move(o.value)); in operator =()
109 value.~T(); in ~optional()
113 T &operator*() const { return value; } in operator *()
130 union {
138 union {
139 …struct { // expected-note {{default constructor of 'Test2<pr16061::X>' is implicitly deleted beca…
145 …Test2<X> t2x; // expected-error {{call to implicitly-deleted default constructor of 'Test2<pr1606…