// // Tests for // explicit operator bool() const; // #include #include "test_policy.h" #include #include struct T { int i; }; template static void tests() { { test_bounded_array_ref const view; if (view) { CHECK(false); } CHECK(!view); } { T array[5] = {}; test_bounded_array_ref const view(array); if (view) { } else { CHECK(false); } CHECK(!!view); } } T_DECL(operator_bool, "bounded_array_ref.operator.bool", T_META_TAG_VM_PREFERRED) { tests(); tests(); }