99 auto const make = [](
S s = S::zero) {
return O {
gdb::in_place, s }; };
101 enum outcome_type { nothrow, caught, bad_catch };
137 O p = make(S::throwing_copy);
139 VERIFY( o && o->state == S::throwing_copy);
140 VERIFY( p && p->state == S::throwing_copy);
146 O p = make(S::throwing_move);
148 VERIFY( o && o->state == S::throwing_move);
149 VERIFY( p && p->state == S::moved_from);
153 ATTRIBUTE_UNUSED outcome_type outcome {};
156 O p = make(S::throwing_copy_assignment);
163 { outcome = caught; }
165 { outcome = bad_catch; }
167 VERIFY( o && o->state == S::threw);
168 VERIFY( p && p->state == S::throwing_copy_assignment);
172 ATTRIBUTE_UNUSED outcome_type outcome {};
175 O p = make(S::throwing_move_assignment);
182 { outcome = caught; }
184 { outcome = bad_catch; }
186 VERIFY( o && o->state == S::threw);
187 VERIFY( p && p->state == S::moved_from);
constexpr gdb::in_place_t in_place
value_type(value_type const &other)
value_type & operator=(value_type &&other)
void throw_if(state_type match)
value_type(state_type state_)
value_type(value_type &&other)
mixin_counter(mixin_counter const &)
value_type & operator=(value_type const &other)