// // Tests for // template // bool operator==(bounded_array_ref const& x, std::nullptr_t); // // template // bool operator!=(bounded_array_ref const& x, std::nullptr_t); // // template // bool operator==(std::nullptr_t, bounded_array_ref const& x); // // template // bool operator!=(std::nullptr_t, bounded_array_ref const& x); // #include #include "test_policy.h" #include #include struct T { int i; }; template static void tests() { { T array[5] = {T{0}, T{1}, T{2}, T{3}, T{4}}; test_bounded_array_ref view(array); CHECK(!(view == nullptr)); CHECK(!(nullptr == view)); CHECK(view != nullptr); CHECK(nullptr != view); } { test_bounded_array_ref view; CHECK(view == nullptr); CHECK(nullptr == view); CHECK(!(view != nullptr)); CHECK(!(nullptr != view)); } } T_DECL(compare_equal_nullptr, "bounded_array_ref.compare.equal.nullptr", T_META_TAG_VM_PREFERRED) { tests(); }