56 gdb::optional<long> o;
63 const long val = 0x1234ABCD;
64 gdb::optional<long> o { gdb::in_place, val};
74 gdb::optional<tracker> o;
82 gdb::optional<tracker> o { gdb::in_place, 333 };
85 VERIFY( copy->value == 333 );
87 VERIFY( o && o->value == 333 );
90 enum outcome { nothrow, caught, bad_catch };
93 outcome result = nothrow;
94 gdb::optional<throwing_copy> o;
103 { result = bad_catch; }
105 VERIFY( result == nothrow );
109 outcome result = nothrow;
110 gdb::optional<throwing_copy> o { gdb::in_place };
119 { result = bad_catch; }
121 VERIFY( result == caught );