Lines Matching refs:T
12 struct T { int i; }; struct
14 operator==(T const& a, T const& b) in operator ==()
19 template <typename T>
23 T array[5] = {T{0}, T{1}, T{2}, T{3}, T{4}}; in tests()
24 T* const begin = &array[0]; in tests()
25 T* const end = &array[5]; in tests()
34 test_bounded_ptr<T> ptr(&array[0], begin, end); in tests()
35 test_bounded_array_ref<T> view(ptr, 5); in tests()
38 CHECK(view[0] == T{0}); in tests()
39 CHECK(view[1] == T{1}); in tests()
40 CHECK(view[2] == T{2}); in tests()
41 CHECK(view[3] == T{3}); in tests()
42 CHECK(view[4] == T{4}); in tests()
51 test_bounded_ptr<T> ptr(&array[0], begin, end); in tests()
52 test_bounded_array_ref<T> view(ptr, 3); in tests()
55 CHECK(view[0] == T{0}); in tests()
56 CHECK(view[1] == T{1}); in tests()
57 CHECK(view[2] == T{2}); in tests()
66 test_bounded_ptr<T> ptr(&array[3], begin, end); in tests()
67 test_bounded_array_ref<T> view(ptr, 2); in tests()
70 CHECK(view[0] == T{3}); in tests()
71 CHECK(view[1] == T{4}); in tests()
75 test_bounded_ptr<T> ptr(&array[0], begin, end); in tests()
76 test_bounded_array_ref<T> view(ptr, 0); in tests()
81 test_bounded_ptr<T> ptr = nullptr; in tests()
82 test_bounded_array_ref<T> view(ptr, 0); in tests()
87 test_bounded_ptr<T> ptr(end, begin, end); in tests()
88 test_bounded_array_ref<T> view(ptr, 0); in tests()
93 test_bounded_ptr<T> ptr(begin, begin, end); in tests()
95 test_bounded_array_ref<T> view(ptr, size); in tests()
102 tests<T>();
103 tests<T const>();