find_end.cpp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. // Range v3 library
  2. //
  3. // Copyright Eric Niebler 2014-present
  4. //
  5. // Use, modification and distribution is subject to the
  6. // Boost Software License, Version 1.0. (See accompanying
  7. // file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // Project home: https://github.com/ericniebler/range-v3
  11. //===----------------------------------------------------------------------===//
  12. //
  13. // The LLVM Compiler Infrastructure
  14. //
  15. // This file is dual licensed under the MIT and the University of Illinois Open
  16. // Source Licenses. See LICENSE.TXT for details.
  17. //
  18. //===----------------------------------------------------------------------===//
  19. #include <utility>
  20. #include <range/v3/core.hpp>
  21. #include <range/v3/algorithm/find_end.hpp>
  22. #include "../simple_test.hpp"
  23. #include "../test_iterators.hpp"
  24. constexpr bool test_constexpr()
  25. {
  26. using namespace ranges;
  27. int ia[] = {0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 2, 0, 1, 0};
  28. auto ia_b = begin(ia);
  29. auto ia_e = end(ia);
  30. constexpr auto sa = size(ia);
  31. int b[] = {0};
  32. int c[] = {0, 1};
  33. int d[] = {0, 1, 2};
  34. int e[] = {0, 1, 2, 3};
  35. int f[] = {0, 1, 2, 3, 4};
  36. int g[] = {0, 1, 2, 3, 4, 5};
  37. int h[] = {0, 1, 2, 3, 4, 5, 6};
  38. STATIC_CHECK_RETURN(find_end(ia_b, ia_e, begin(b), b + 1).begin() == ia + sa - 1);
  39. STATIC_CHECK_RETURN(find_end(ia_b, ia_e, begin(c), c + 2).begin() == ia + 18);
  40. STATIC_CHECK_RETURN(find_end(ia_b, ia_e, begin(d), d + 3).begin() == ia + 15);
  41. STATIC_CHECK_RETURN(find_end(ia_b, ia_e, begin(e), e + 4).begin() == ia + 11);
  42. STATIC_CHECK_RETURN(find_end(ia_b, ia_e, begin(f), f + 5).begin() == ia + 6);
  43. STATIC_CHECK_RETURN(find_end(ia_b, ia_e, begin(g), g + 6).begin() == ia);
  44. STATIC_CHECK_RETURN(find_end(ia_b, ia_e, begin(h), h + 7).begin() == ia + sa);
  45. STATIC_CHECK_RETURN(find_end(ia_b, ia_e, begin(b), b).begin() == ia + sa);
  46. STATIC_CHECK_RETURN(find_end(ia_b, ia_b, begin(b), b + 1).begin() == ia);
  47. auto ir = make_subrange(ia_b, ia_e);
  48. STATIC_CHECK_RETURN(find_end(ir, make_subrange(begin(b), b + 1)).begin() == ia + sa - 1);
  49. STATIC_CHECK_RETURN(find_end(ir, make_subrange(begin(c), c + 2)).begin() == ia + 18);
  50. STATIC_CHECK_RETURN(find_end(ir, make_subrange(begin(d), d + 3)).begin() == ia + 15);
  51. STATIC_CHECK_RETURN(find_end(ir, make_subrange(begin(e), e + 4)).begin() == ia + 11);
  52. STATIC_CHECK_RETURN(find_end(ir, make_subrange(begin(f), f + 5)).begin() == ia + 6);
  53. STATIC_CHECK_RETURN(find_end(ir, make_subrange(begin(g), g + 6)).begin() == ia);
  54. STATIC_CHECK_RETURN(find_end(ir, make_subrange(begin(h), h + 7)).begin() == ia + sa);
  55. STATIC_CHECK_RETURN(find_end(ir, make_subrange(begin(b), b)).begin() == ia + sa);
  56. STATIC_CHECK_RETURN(find_end(std::move(ir), make_subrange(begin(b), b + 1)).begin() == ia + sa - 1);
  57. STATIC_CHECK_RETURN(find_end(std::move(ir), make_subrange(begin(c), c + 2)).begin() == ia + 18);
  58. STATIC_CHECK_RETURN(find_end(std::move(ir), make_subrange(begin(d), d + 3)).begin() == ia + 15);
  59. STATIC_CHECK_RETURN(find_end(std::move(ir), make_subrange(begin(e), e + 4)).begin() == ia + 11);
  60. STATIC_CHECK_RETURN(find_end(std::move(ir), make_subrange(begin(f), f + 5)).begin() == ia + 6);
  61. STATIC_CHECK_RETURN(find_end(std::move(ir), make_subrange(begin(g), g + 6)).begin() == ia);
  62. STATIC_CHECK_RETURN(find_end(std::move(ir), make_subrange(begin(h), h + 7)).begin() == ia + sa);
  63. STATIC_CHECK_RETURN(find_end(std::move(ir), make_subrange(begin(b), b)).begin() == ia + sa);
  64. auto er = make_subrange(ia_b, ia);
  65. STATIC_CHECK_RETURN(find_end(er, make_subrange(b, b + 1)).begin() == ia);
  66. STATIC_CHECK_RETURN(find_end(std::move(er), make_subrange(b, b + 1)).begin() == ia);
  67. return true;
  68. }
  69. template<class Iter1, class Iter2, typename Sent1 = Iter1, typename Sent2 = Iter2>
  70. void
  71. test()
  72. {
  73. using namespace ranges;
  74. int ia[] = {0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 2, 0, 1, 0};
  75. constexpr auto sa = size(ia);
  76. int b[] = {0};
  77. int c[] = {0, 1};
  78. int d[] = {0, 1, 2};
  79. int e[] = {0, 1, 2, 3};
  80. int f[] = {0, 1, 2, 3, 4};
  81. int g[] = {0, 1, 2, 3, 4, 5};
  82. int h[] = {0, 1, 2, 3, 4, 5, 6};
  83. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(b), Sent2(b + 1)).begin() == Iter1(ia + sa - 1));
  84. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(b), Sent2(b + 1)).end() == Iter1(ia + sa - 1 + 1));
  85. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(c), Sent2(c + 2)).begin() == Iter1(ia + 18));
  86. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(c), Sent2(c + 2)).end() == Iter1(ia + 18 + 2));
  87. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(d), Sent2(d + 3)).begin() == Iter1(ia + 15));
  88. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(d), Sent2(d + 3)).end() == Iter1(ia + 15 + 3));
  89. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(e), Sent2(e + 4)).begin() == Iter1(ia + 11));
  90. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(e), Sent2(e + 4)).end() == Iter1(ia + 11 + 4));
  91. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(f), Sent2(f + 5)).begin() == Iter1(ia + 6));
  92. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(f), Sent2(f + 5)).end() == Iter1(ia + 6 + 5));
  93. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(g), Sent2(g + 6)).begin() == Iter1(ia));
  94. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(g), Sent2(g + 6)).end() == Iter1(ia + 6));
  95. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(h), Sent2(h + 7)).begin() == Iter1(ia + sa));
  96. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(h), Sent2(h + 7)).end() == Iter1(ia + sa));
  97. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(b), Sent2(b)).begin() == Iter1(ia + sa));
  98. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(b), Sent2(b)).end() == Iter1(ia + sa));
  99. CHECK(find_end(Iter1(ia), Sent1(ia), Iter2(b), Sent2(b + 1)).begin() == Iter1(ia));
  100. CHECK(find_end(Iter1(ia), Sent1(ia), Iter2(b), Sent2(b + 1)).end() == Iter1(ia));
  101. auto ir = make_subrange(Iter1(ia), Sent1(ia + sa));
  102. CHECK(find_end(ir, make_subrange(Iter2(b), Sent2(b + 1))).begin() == Iter1(ia + sa - 1));
  103. CHECK(find_end(ir, make_subrange(Iter2(b), Sent2(b + 1))).end() == Iter1(ia + sa - 1 + 1));
  104. CHECK(find_end(ir, make_subrange(Iter2(c), Sent2(c + 2))).begin() == Iter1(ia + 18));
  105. CHECK(find_end(ir, make_subrange(Iter2(c), Sent2(c + 2))).end() == Iter1(ia + 18 + 2));
  106. CHECK(find_end(ir, make_subrange(Iter2(d), Sent2(d + 3))).begin() == Iter1(ia + 15));
  107. CHECK(find_end(ir, make_subrange(Iter2(d), Sent2(d + 3))).end() == Iter1(ia + 15 + 3));
  108. CHECK(find_end(ir, make_subrange(Iter2(e), Sent2(e + 4))).begin() == Iter1(ia + 11));
  109. CHECK(find_end(ir, make_subrange(Iter2(e), Sent2(e + 4))).end() == Iter1(ia + 11 + 4));
  110. CHECK(find_end(ir, make_subrange(Iter2(f), Sent2(f + 5))).begin() == Iter1(ia + 6));
  111. CHECK(find_end(ir, make_subrange(Iter2(f), Sent2(f + 5))).end() == Iter1(ia + 6 + 5));
  112. CHECK(find_end(ir, make_subrange(Iter2(g), Sent2(g + 6))).begin() == Iter1(ia));
  113. CHECK(find_end(ir, make_subrange(Iter2(g), Sent2(g + 6))).end() == Iter1(ia + 6));
  114. CHECK(find_end(ir, make_subrange(Iter2(h), Sent2(h + 7))).begin() == Iter1(ia + sa));
  115. CHECK(find_end(ir, make_subrange(Iter2(h), Sent2(h + 7))).end() == Iter1(ia + sa));
  116. CHECK(find_end(ir, make_subrange(Iter2(b), Sent2(b))).begin() == Iter1(ia + sa));
  117. CHECK(find_end(ir, make_subrange(Iter2(b), Sent2(b))).end() == Iter1(ia + sa));
  118. CHECK(find_end(std::move(ir), make_subrange(Iter2(b), Sent2(b + 1))).begin() == Iter1(ia + sa - 1));
  119. CHECK(find_end(std::move(ir), make_subrange(Iter2(c), Sent2(c + 2))).begin() == Iter1(ia + 18));
  120. CHECK(find_end(std::move(ir), make_subrange(Iter2(c), Sent2(c + 2))).end() == Iter1(ia + 18 + 2));
  121. CHECK(find_end(std::move(ir), make_subrange(Iter2(d), Sent2(d + 3))).begin() == Iter1(ia + 15));
  122. CHECK(find_end(std::move(ir), make_subrange(Iter2(d), Sent2(d + 3))).end() == Iter1(ia + 15 + 3));
  123. CHECK(find_end(std::move(ir), make_subrange(Iter2(e), Sent2(e + 4))).begin() == Iter1(ia + 11));
  124. CHECK(find_end(std::move(ir), make_subrange(Iter2(e), Sent2(e + 4))).end() == Iter1(ia + 11 + 4));
  125. CHECK(find_end(std::move(ir), make_subrange(Iter2(f), Sent2(f + 5))).begin() == Iter1(ia + 6));
  126. CHECK(find_end(std::move(ir), make_subrange(Iter2(f), Sent2(f + 5))).end() == Iter1(ia + 6 + 5));
  127. CHECK(find_end(std::move(ir), make_subrange(Iter2(g), Sent2(g + 6))).begin() == Iter1(ia));
  128. CHECK(find_end(std::move(ir), make_subrange(Iter2(g), Sent2(g + 6))).end() == Iter1(ia + 6));
  129. CHECK(find_end(std::move(ir), make_subrange(Iter2(h), Sent2(h + 7))).begin() == Iter1(ia + sa));
  130. CHECK(find_end(std::move(ir), make_subrange(Iter2(h), Sent2(h + 7))).end() == Iter1(ia + sa));
  131. CHECK(find_end(std::move(ir), make_subrange(Iter2(b), Sent2(b))).begin() == Iter1(ia + sa));
  132. auto er = make_subrange(Iter1(ia), Sent1(ia));
  133. CHECK(find_end(er, make_subrange(Iter2(b), Sent2(b + 1))).begin() == Iter1(ia));
  134. CHECK(find_end(er, make_subrange(Iter2(b), Sent2(b + 1))).end() == Iter1(ia));
  135. CHECK(find_end(std::move(er), make_subrange(Iter2(b), Sent2(b + 1))).begin() == Iter1(ia));
  136. CHECK(find_end(std::move(er), make_subrange(Iter2(b), Sent2(b + 1))).end() == Iter1(ia));
  137. }
  138. struct count_equal
  139. {
  140. static unsigned count;
  141. template<class T>
  142. bool operator()(const T& x, const T& y)
  143. {
  144. ++count; return x == y;
  145. }
  146. };
  147. unsigned count_equal::count = 0;
  148. template<class Iter1, class Iter2, typename Sent1 = Iter1, typename Sent2 = Iter2>
  149. void
  150. test_pred()
  151. {
  152. using namespace ranges;
  153. int ia[] = {0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 2, 0, 1, 0};
  154. constexpr auto sa = size(ia);
  155. int b[] = {0};
  156. int c[] = {0, 1};
  157. int d[] = {0, 1, 2};
  158. int e[] = {0, 1, 2, 3};
  159. int f[] = {0, 1, 2, 3, 4};
  160. int g[] = {0, 1, 2, 3, 4, 5};
  161. int h[] = {0, 1, 2, 3, 4, 5, 6};
  162. count_equal::count = 0;
  163. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(b), Sent2(b + 1), count_equal()).begin() == Iter1(ia + sa - 1));
  164. CHECK(count_equal::count <= 1 * (sa - 1 + 1));
  165. count_equal::count = 0;
  166. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(c), Sent2(c + 2), count_equal()).begin() == Iter1(ia + 18));
  167. CHECK(count_equal::count <= 2 * (sa - 2 + 1));
  168. count_equal::count = 0;
  169. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(d), Sent2(d + 3), count_equal()).begin() == Iter1(ia + 15));
  170. CHECK(count_equal::count <= 3 * (sa - 3 + 1));
  171. count_equal::count = 0;
  172. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(e), Sent2(e + 4), count_equal()).begin() == Iter1(ia + 11));
  173. CHECK(count_equal::count <= 4 * (sa - 4 + 1));
  174. count_equal::count = 0;
  175. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(f), Sent2(f + 5), count_equal()).begin() == Iter1(ia + 6));
  176. CHECK(count_equal::count <= 5 * (sa - 5 + 1));
  177. count_equal::count = 0;
  178. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(g), Sent2(g + 6), count_equal()).begin() == Iter1(ia));
  179. CHECK(count_equal::count <= 6 * (sa - 6 + 1));
  180. count_equal::count = 0;
  181. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(h), Sent2(h + 7), count_equal()).begin() == Iter1(ia + sa));
  182. CHECK(count_equal::count <= 7 * (sa - 7 + 1));
  183. count_equal::count = 0;
  184. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(b), Sent2(b), count_equal()).begin() == Iter1(ia + sa));
  185. CHECK(count_equal::count == 0u);
  186. count_equal::count = 0;
  187. CHECK(find_end(Iter1(ia), Sent1(ia), Iter2(b), Sent2(b + 1), count_equal()).begin() == Iter1(ia));
  188. CHECK(count_equal::count == 0u);
  189. auto ir = make_subrange(Iter1(ia), Sent1(ia + sa));
  190. count_equal::count = 0;
  191. CHECK(find_end(ir, make_subrange(Iter2(b), Sent2(b + 1)), count_equal()).begin() == Iter1(ia + sa - 1));
  192. CHECK(count_equal::count <= 1 * (sa - 1 + 1));
  193. count_equal::count = 0;
  194. CHECK(find_end(ir, make_subrange(Iter2(c), Sent2(c + 2)), count_equal()).begin() == Iter1(ia + 18));
  195. CHECK(count_equal::count <= 2 * (sa - 2 + 1));
  196. count_equal::count = 0;
  197. CHECK(find_end(ir, make_subrange(Iter2(d), Sent2(d + 3)), count_equal()).begin() == Iter1(ia + 15));
  198. CHECK(count_equal::count <= 3 * (sa - 3 + 1));
  199. count_equal::count = 0;
  200. CHECK(find_end(ir, make_subrange(Iter2(e), Sent2(e + 4)), count_equal()).begin() == Iter1(ia + 11));
  201. CHECK(count_equal::count <= 4 * (sa - 4 + 1));
  202. count_equal::count = 0;
  203. CHECK(find_end(ir, make_subrange(Iter2(f), Sent2(f + 5)), count_equal()).begin() == Iter1(ia + 6));
  204. CHECK(count_equal::count <= 5 * (sa - 5 + 1));
  205. count_equal::count = 0;
  206. CHECK(find_end(ir, make_subrange(Iter2(g), Sent2(g + 6)), count_equal()).begin() == Iter1(ia));
  207. CHECK(count_equal::count <= 6 * (sa - 6 + 1));
  208. count_equal::count = 0;
  209. CHECK(find_end(ir, make_subrange(Iter2(h), Sent2(h + 7)), count_equal()).begin() == Iter1(ia + sa));
  210. CHECK(count_equal::count <= 7 * (sa - 7 + 1));
  211. count_equal::count = 0;
  212. CHECK(find_end(ir, make_subrange(Iter2(b), Sent2(b)), count_equal()).begin() == Iter1(ia + sa));
  213. CHECK(count_equal::count == 0u);
  214. count_equal::count = 0;
  215. auto er = make_subrange(Iter1(ia), Sent1(ia));
  216. CHECK(find_end(er, make_subrange(Iter2(b), Sent2(b + 1)), count_equal()).begin() == Iter1(ia));
  217. CHECK(count_equal::count == 0u);
  218. static_assert(std::is_same<subrange<Iter1>, decltype(find_end(er, {1, 2, 3}))>::value, "");
  219. }
  220. struct S
  221. {
  222. int i_;
  223. };
  224. template<class Iter1, class Iter2, typename Sent1 = Iter1, typename Sent2 = Iter2>
  225. void
  226. test_proj()
  227. {
  228. using namespace ranges;
  229. S ia[] = {{0}, {1}, {2}, {3}, {4}, {5}, {0}, {1}, {2}, {3}, {4}, {0}, {1}, {2}, {3}, {0}, {1}, {2}, {0}, {1}, {0}};
  230. constexpr auto sa = size(ia);
  231. int b[] = {0};
  232. int c[] = {0, 1};
  233. int d[] = {0, 1, 2};
  234. int e[] = {0, 1, 2, 3};
  235. int f[] = {0, 1, 2, 3, 4};
  236. int g[] = {0, 1, 2, 3, 4, 5};
  237. int h[] = {0, 1, 2, 3, 4, 5, 6};
  238. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(b), Sent2(b + 1), equal_to(), &S::i_).begin() == Iter1(ia + sa - 1));
  239. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(c), Sent2(c + 2), equal_to(), &S::i_).begin() == Iter1(ia + 18));
  240. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(d), Sent2(d + 3), equal_to(), &S::i_).begin() == Iter1(ia + 15));
  241. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(e), Sent2(e + 4), equal_to(), &S::i_).begin() == Iter1(ia + 11));
  242. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(f), Sent2(f + 5), equal_to(), &S::i_).begin() == Iter1(ia + 6));
  243. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(g), Sent2(g + 6), equal_to(), &S::i_).begin() == Iter1(ia));
  244. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(h), Sent2(h + 7), equal_to(), &S::i_).begin() == Iter1(ia + sa));
  245. CHECK(find_end(Iter1(ia), Sent1(ia + sa), Iter2(b), Sent2(b), equal_to(), &S::i_).begin() == Iter1(ia + sa));
  246. CHECK(find_end(Iter1(ia), Sent1(ia), Iter2(b), Sent2(b + 1), equal_to(), &S::i_).begin() == Iter1(ia));
  247. auto ir = make_subrange(Iter1(ia), Sent1(ia + sa));
  248. CHECK(find_end(ir, make_subrange(Iter2(b), Sent2(b + 1)), equal_to(), &S::i_).begin() == Iter1(ia + sa - 1));
  249. CHECK(find_end(ir, make_subrange(Iter2(c), Sent2(c + 2)), equal_to(), &S::i_).begin() == Iter1(ia + 18));
  250. CHECK(find_end(ir, make_subrange(Iter2(d), Sent2(d + 3)), equal_to(), &S::i_).begin() == Iter1(ia + 15));
  251. CHECK(find_end(ir, make_subrange(Iter2(e), Sent2(e + 4)), equal_to(), &S::i_).begin() == Iter1(ia + 11));
  252. CHECK(find_end(ir, make_subrange(Iter2(f), Sent2(f + 5)), equal_to(), &S::i_).begin() == Iter1(ia + 6));
  253. CHECK(find_end(ir, make_subrange(Iter2(g), Sent2(g + 6)), equal_to(), &S::i_).begin() == Iter1(ia));
  254. CHECK(find_end(ir, make_subrange(Iter2(h), Sent2(h + 7)), equal_to(), &S::i_).begin() == Iter1(ia + sa));
  255. CHECK(find_end(ir, make_subrange(Iter2(b), Sent2(b)), equal_to(), &S::i_).begin() == Iter1(ia + sa));
  256. auto er = make_subrange(Iter1(ia), Sent1(ia));
  257. CHECK(find_end(er, make_subrange(Iter2(b), Sent2(b + 1)), equal_to(), &S::i_).begin() == Iter1(ia));
  258. }
  259. int main()
  260. {
  261. test<ForwardIterator<const int*>, ForwardIterator<const int*> >();
  262. // test<ForwardIterator<const int*>, BidirectionalIterator<const int*> >();
  263. // test<ForwardIterator<const int*>, RandomAccessIterator<const int*> >();
  264. // test<BidirectionalIterator<const int*>, ForwardIterator<const int*> >();
  265. // test<BidirectionalIterator<const int*>, BidirectionalIterator<const int*> >();
  266. // test<BidirectionalIterator<const int*>, RandomAccessIterator<const int*> >();
  267. // test<RandomAccessIterator<const int*>, ForwardIterator<const int*> >();
  268. // test<RandomAccessIterator<const int*>, BidirectionalIterator<const int*> >();
  269. // test<RandomAccessIterator<const int*>, RandomAccessIterator<const int*> >();
  270. // test<ForwardIterator<const int*>, ForwardIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  271. // test<ForwardIterator<const int*>, BidirectionalIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  272. // test<ForwardIterator<const int*>, RandomAccessIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  273. // test<BidirectionalIterator<const int*>, ForwardIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  274. // test<BidirectionalIterator<const int*>, BidirectionalIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  275. // test<BidirectionalIterator<const int*>, RandomAccessIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  276. // test<RandomAccessIterator<const int*>, ForwardIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  277. // test<RandomAccessIterator<const int*>, BidirectionalIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  278. // test<RandomAccessIterator<const int*>, RandomAccessIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  279. // test_pred<ForwardIterator<const int*>, ForwardIterator<const int*> >();
  280. // test_pred<ForwardIterator<const int*>, BidirectionalIterator<const int*> >();
  281. // test_pred<ForwardIterator<const int*>, RandomAccessIterator<const int*> >();
  282. // test_pred<BidirectionalIterator<const int*>, ForwardIterator<const int*> >();
  283. // test_pred<BidirectionalIterator<const int*>, BidirectionalIterator<const int*> >();
  284. // test_pred<BidirectionalIterator<const int*>, RandomAccessIterator<const int*> >();
  285. // test_pred<RandomAccessIterator<const int*>, ForwardIterator<const int*> >();
  286. // test_pred<RandomAccessIterator<const int*>, BidirectionalIterator<const int*> >();
  287. // test_pred<RandomAccessIterator<const int*>, RandomAccessIterator<const int*> >();
  288. // test_pred<ForwardIterator<const int*>, ForwardIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  289. // test_pred<ForwardIterator<const int*>, BidirectionalIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  290. // test_pred<ForwardIterator<const int*>, RandomAccessIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  291. // test_pred<BidirectionalIterator<const int*>, ForwardIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  292. // test_pred<BidirectionalIterator<const int*>, BidirectionalIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  293. // test_pred<BidirectionalIterator<const int*>, RandomAccessIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  294. // test_pred<RandomAccessIterator<const int*>, ForwardIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  295. // test_pred<RandomAccessIterator<const int*>, BidirectionalIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  296. // test_pred<RandomAccessIterator<const int*>, RandomAccessIterator<const int*>, Sentinel<const int*>, Sentinel<const int *> >();
  297. // test_proj<ForwardIterator<const S*>, ForwardIterator<const int*> >();
  298. // test_proj<ForwardIterator<const S*>, BidirectionalIterator<const int*> >();
  299. // test_proj<ForwardIterator<const S*>, RandomAccessIterator<const int*> >();
  300. // test_proj<BidirectionalIterator<const S*>, ForwardIterator<const int*> >();
  301. // test_proj<BidirectionalIterator<const S*>, BidirectionalIterator<const int*> >();
  302. // test_proj<BidirectionalIterator<const S*>, RandomAccessIterator<const int*> >();
  303. // test_proj<RandomAccessIterator<const S*>, ForwardIterator<const int*> >();
  304. // test_proj<RandomAccessIterator<const S*>, BidirectionalIterator<const int*> >();
  305. // test_proj<RandomAccessIterator<const S*>, RandomAccessIterator<const int*> >();
  306. // test_proj<ForwardIterator<const S*>, ForwardIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  307. // test_proj<ForwardIterator<const S*>, BidirectionalIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  308. // test_proj<ForwardIterator<const S*>, RandomAccessIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  309. // test_proj<BidirectionalIterator<const S*>, ForwardIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  310. // test_proj<BidirectionalIterator<const S*>, BidirectionalIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  311. // test_proj<BidirectionalIterator<const S*>, RandomAccessIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  312. // test_proj<RandomAccessIterator<const S*>, ForwardIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  313. // test_proj<RandomAccessIterator<const S*>, BidirectionalIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  314. // test_proj<RandomAccessIterator<const S*>, RandomAccessIterator<const int*>, Sentinel<const S*>, Sentinel<const int *> >();
  315. {
  316. STATIC_CHECK(test_constexpr());
  317. }
  318. return ::test_result();
  319. }