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_assignment);
139 VERIFY( o && o->state == S::throwing_copy_assignment );
140 VERIFY( p && p->state == S::throwing_copy_assignment );
146 O p = make(S::throwing_move_assignment);
148 VERIFY( o && o->state == S::throwing_move_assignment );
149 VERIFY( p && p->state == S::moved_from );
153 outcome_type outcome {};
156 O p = make(S::throwing_copy);
163 { outcome = caught; }
165 { outcome = bad_catch; }
167 VERIFY( outcome == caught );
169 VERIFY( p && p->state == S::throwing_copy );
173 outcome_type outcome {};
176 O p = make(S::throwing_move);
183 { outcome = caught; }
185 { outcome = bad_catch; }
187 VERIFY( outcome == caught );
189 VERIFY( p && p->state == S::moved_from );
constexpr gdb::in_place_t in_place
value_type & operator=(value_type &&other)
void throw_if(state_type match)
value_type(state_type state_)
value_type(value_type const &other)
value_type(value_type &&other)
value_type & operator=(value_type const &other)
mixin_counter(mixin_counter const &)