extraordinary fix: find_end implementation

This commit is contained in:
bolero-MURAKAMI 2013-08-12 00:09:40 +09:00
parent 7c8f28115c
commit 72fe72a623
45 changed files with 68 additions and 171 deletions

View file

@ -83,7 +83,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find( SPROUT_STATIC_CONSTEXPR auto found = sprout::adjacent_find(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -115,7 +114,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of( SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -53,7 +53,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal( SPROUT_STATIC_CONSTEXPR auto result = sprout::all_of_equal(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -70,7 +69,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of( SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal( SPROUT_STATIC_CONSTEXPR auto result = sprout::any_of_equal(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -37,7 +37,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search( SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search(
testspr::reduct_forward(sprout::begin(arr1)), testspr::reduct_forward(sprout::begin(arr1)),
@ -55,9 +54,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search( SPROUT_STATIC_CONSTEXPR auto result = sprout::binary_search(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -75,7 +72,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result == 0); TESTSPR_BOTH_ASSERT(result == 0);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::count( SPROUT_STATIC_CONSTEXPR auto result = sprout::count(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result == 0); TESTSPR_BOTH_ASSERT(result == 0);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result == 5); TESTSPR_BOTH_ASSERT(result == 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if( SPROUT_STATIC_CONSTEXPR auto result = sprout::count_if(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result == 5); TESTSPR_BOTH_ASSERT(result == 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -161,7 +161,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( SPROUT_STATIC_CONSTEXPR auto result = sprout::equal(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -231,7 +230,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( SPROUT_STATIC_CONSTEXPR auto result = sprout::equal(
@ -388,7 +386,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::equal( SPROUT_STATIC_CONSTEXPR auto result = sprout::equal(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -466,7 +463,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -64,7 +64,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(sprout::distance(found.first.base(), found.second.base()) == 0); TESTSPR_BOTH_ASSERT(sprout::distance(found.first.base(), found.second.base()) == 0);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::equal_range( SPROUT_STATIC_CONSTEXPR auto found = sprout::equal_range(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -86,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr1) + 5);
TESTSPR_BOTH_ASSERT(sprout::distance(found.first.base(), found.second.base()) == 0); TESTSPR_BOTH_ASSERT(sprout::distance(found.first.base(), found.second.base()) == 0);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::find( SPROUT_STATIC_CONSTEXPR auto found = sprout::find(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -177,7 +177,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end( SPROUT_STATIC_CONSTEXPR auto found = sprout::find_end(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -218,7 +217,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -177,7 +177,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of( SPROUT_STATIC_CONSTEXPR auto found = sprout::find_first_of(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -255,7 +254,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if( SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not( SPROUT_STATIC_CONSTEXPR auto found = sprout::find_if_not(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -99,7 +99,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( SPROUT_STATIC_CONSTEXPR auto result = sprout::includes(
testspr::reduct_input(sprout::begin(arr1)), testspr::reduct_input(sprout::begin(arr1)),
@ -177,9 +176,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::includes( SPROUT_STATIC_CONSTEXPR auto result = sprout::includes(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -257,7 +254,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -34,7 +34,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing(
testspr::reduct_forward(sprout::begin(arr1)), testspr::reduct_forward(sprout::begin(arr1)),
@ -49,9 +48,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_decreasing(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -66,7 +63,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -81,7 +81,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_heap(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -142,7 +141,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -81,7 +81,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until( SPROUT_STATIC_CONSTEXPR auto found = sprout::is_heap_until(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -142,7 +141,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr2) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -34,7 +34,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing(
testspr::reduct_forward(sprout::begin(arr1)), testspr::reduct_forward(sprout::begin(arr1)),
@ -49,9 +48,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_increasing(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -66,7 +63,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_partitioned(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -161,7 +161,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -231,7 +230,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation(
@ -389,7 +387,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_permutation(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -467,7 +464,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -50,7 +50,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted(
testspr::reduct_forward(sprout::begin(arr1)), testspr::reduct_forward(sprout::begin(arr1)),
@ -81,9 +80,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_sorted(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -114,7 +111,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -81,7 +81,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until( SPROUT_STATIC_CONSTEXPR auto found = sprout::is_sorted_until(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -112,7 +111,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -49,7 +49,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing(
testspr::reduct_forward(sprout::begin(arr1)), testspr::reduct_forward(sprout::begin(arr1)),
@ -78,9 +77,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_decreasing(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -109,7 +106,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -49,7 +49,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing(
testspr::reduct_forward(sprout::begin(arr1)), testspr::reduct_forward(sprout::begin(arr1)),
@ -78,9 +77,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing( SPROUT_STATIC_CONSTEXPR auto result = sprout::is_strictly_increasing(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -109,7 +106,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -156,7 +156,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare(
testspr::reduct_input(sprout::begin(arr1)), testspr::reduct_input(sprout::begin(arr1)),
@ -290,9 +289,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare( SPROUT_STATIC_CONSTEXPR auto result = sprout::lexicographical_compare(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -426,7 +423,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -55,7 +55,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::lower_bound( SPROUT_STATIC_CONSTEXPR auto found = sprout::lower_bound(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -73,7 +72,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -81,7 +81,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4); TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element( SPROUT_STATIC_CONSTEXPR auto result = sprout::max_element(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -112,7 +111,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4); TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 4);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -81,7 +81,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3); TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element( SPROUT_STATIC_CONSTEXPR auto result = sprout::min_element(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -112,7 +111,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3); TESTSPR_BOTH_ASSERT(result == sprout::begin(arr1) + 3);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -89,7 +89,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 4); TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 4);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element( SPROUT_STATIC_CONSTEXPR auto result = sprout::minmax_element(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -124,7 +123,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 3); TESTSPR_BOTH_ASSERT(result.first.base() == sprout::begin(arr1) + 3);
TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 4); TESTSPR_BOTH_ASSERT(result.second.base() == sprout::begin(arr1) + 4);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -177,7 +177,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2));
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -255,7 +254,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1));
TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2));
} }
#endif
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch(
@ -429,7 +427,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2));
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch( SPROUT_STATIC_CONSTEXPR auto found = sprout::mismatch(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -515,7 +512,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1)); TESTSPR_BOTH_ASSERT(found.first.base() == sprout::begin(arr1));
TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2)); TESTSPR_BOTH_ASSERT(found.second.base() == sprout::begin(arr2));
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of( SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal( SPROUT_STATIC_CONSTEXPR auto result = sprout::none_of_equal(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result); TESTSPR_BOTH_ASSERT(result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of( SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -85,7 +85,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal( SPROUT_STATIC_CONSTEXPR auto result = sprout::one_of_equal(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -118,7 +117,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(!result); TESTSPR_BOTH_ASSERT(!result);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -53,7 +53,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::partition_point( SPROUT_STATIC_CONSTEXPR auto found = sprout::partition_point(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -70,7 +69,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -177,7 +177,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::search( SPROUT_STATIC_CONSTEXPR auto found = sprout::search(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -255,7 +254,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -175,7 +175,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n( SPROUT_STATIC_CONSTEXPR auto found = sprout::search_n(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -253,7 +252,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -156,7 +156,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(result > 0); TESTSPR_BOTH_ASSERT(result > 0);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare(
testspr::reduct_input(sprout::begin(arr1)), testspr::reduct_input(sprout::begin(arr1)),
@ -290,9 +289,7 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result > 0); TESTSPR_BOTH_ASSERT(result > 0);
} }
#endif
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare( SPROUT_STATIC_CONSTEXPR auto result = sprout::tristate_lexicographical_compare(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -426,7 +423,6 @@ namespace testspr {
); );
TESTSPR_BOTH_ASSERT(result > 0); TESTSPR_BOTH_ASSERT(result > 0);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -55,7 +55,6 @@ namespace testspr {
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#if defined(__clang__)
{ {
SPROUT_STATIC_CONSTEXPR auto found = sprout::upper_bound( SPROUT_STATIC_CONSTEXPR auto found = sprout::upper_bound(
testspr::reduct_random_access(sprout::begin(arr1)), testspr::reduct_random_access(sprout::begin(arr1)),
@ -73,7 +72,6 @@ namespace testspr {
).base(); ).base();
TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5); TESTSPR_BOTH_ASSERT(found == sprout::begin(arr1) + 5);
} }
#endif
} }
} }
} // namespace testspr } // namespace testspr

View file

@ -19,70 +19,71 @@
namespace sprout { namespace sprout {
namespace detail { namespace detail {
template<typename RandomAccessIterator1> // !!!
inline SPROUT_CONSTEXPR RandomAccessIterator1 // template<typename RandomAccessIterator1>
find_end_impl_check_ra(RandomAccessIterator1 first1, RandomAccessIterator1 result, RandomAccessIterator1 searched) { // inline SPROUT_CONSTEXPR RandomAccessIterator1
return searched == first1 ? searched // find_end_impl_check_ra(RandomAccessIterator1 first1, RandomAccessIterator1 result, RandomAccessIterator1 searched) {
: result // return searched == first1 ? searched
; // : result
} // ;
template<typename RandomAccessIterator1, typename ForwardIterator2, typename BinaryPredicate> // }
inline SPROUT_CONSTEXPR RandomAccessIterator1 // template<typename RandomAccessIterator1, typename ForwardIterator2, typename BinaryPredicate>
find_end_impl_ra( // inline SPROUT_CONSTEXPR RandomAccessIterator1
RandomAccessIterator1 first1, RandomAccessIterator1 last1, // find_end_impl_ra(
ForwardIterator2 first2, ForwardIterator2 last2, // RandomAccessIterator1 first1, RandomAccessIterator1 last1,
BinaryPredicate pred, // ForwardIterator2 first2, ForwardIterator2 last2,
typename std::iterator_traits<RandomAccessIterator1>::difference_type pivot, RandomAccessIterator1 last1_, RandomAccessIterator1 result, // BinaryPredicate pred,
RandomAccessIterator1 searched // typename std::iterator_traits<RandomAccessIterator1>::difference_type pivot, RandomAccessIterator1 last1_, RandomAccessIterator1 result,
) // RandomAccessIterator1 searched
{ // )
return searched == last1_ ? result // {
: searched < first1 ? pivot == 0 // return searched == last1_ ? result
? sprout::detail::find_end_impl_check_ra( // : searched < first1 ? pivot == 0
first1, searched, // ? sprout::detail::find_end_impl_check_ra(
sprout::detail::search_one(first1, last1_, first2, last2, pred) // first1, searched,
) // sprout::detail::search_one(first1, last1_, first2, last2, pred)
: sprout::detail::find_end_impl_ra( // )
sprout::next(first1, pivot), last1, first2, last2, pred, // : sprout::detail::find_end_impl_ra(
(sprout::distance(first1, last1) - pivot) / 2, last1_, searched, // sprout::next(first1, pivot), last1, first2, last2, pred,
sprout::detail::find_end_impl_ra( // (sprout::distance(first1, last1) - pivot) / 2, last1_, searched,
first1, sprout::next(first1, pivot), first2, last2, pred, // sprout::detail::find_end_impl_ra(
pivot / 2, last1_, searched, // first1, sprout::next(first1, pivot), first2, last2, pred,
first1 // pivot / 2, last1_, searched,
) // first1
) // )
: pivot == 0 ? sprout::detail::search_one(first1, last1_, first2, last2, pred) // )
: sprout::detail::find_end_impl_ra( // : pivot == 0 ? sprout::detail::search_one(first1, last1_, first2, last2, pred)
sprout::next(first1, pivot), last1, first2, last2, pred, // : sprout::detail::find_end_impl_ra(
(sprout::distance(first1, last1) - pivot) / 2, last1_, result, // sprout::next(first1, pivot), last1, first2, last2, pred,
sprout::detail::find_end_impl_ra( // (sprout::distance(first1, last1) - pivot) / 2, last1_, result,
first1, sprout::next(first1, pivot), first2, last2, pred, // sprout::detail::find_end_impl_ra(
pivot / 2, last1_, result, // first1, sprout::next(first1, pivot), first2, last2, pred,
first1 // pivot / 2, last1_, result,
) // first1
) // )
; // )
} // ;
template<typename RandomAccessIterator1, typename ForwardIterator2, typename BinaryPredicate> // }
inline SPROUT_CONSTEXPR typename std::enable_if< // template<typename RandomAccessIterator1, typename ForwardIterator2, typename BinaryPredicate>
sprout::is_constant_distance_iterator<RandomAccessIterator1>::value, // inline SPROUT_CONSTEXPR typename std::enable_if<
RandomAccessIterator1 // sprout::is_constant_distance_iterator<RandomAccessIterator1>::value,
>::type // RandomAccessIterator1
find_end( // >::type
RandomAccessIterator1 first1, RandomAccessIterator1 last1, // find_end(
ForwardIterator2 first2, ForwardIterator2 last2, // RandomAccessIterator1 first1, RandomAccessIterator1 last1,
BinaryPredicate pred, // ForwardIterator2 first2, ForwardIterator2 last2,
std::random_access_iterator_tag* // BinaryPredicate pred,
) // std::random_access_iterator_tag*
{ // )
return first1 == last1 ? last1 // {
: sprout::detail::find_end_impl_ra( // return first1 == last1 ? last1
first1, last1, first2, last2, pred, // : sprout::detail::find_end_impl_ra(
sprout::distance(first1, last1) / 2, last1, last1, // first1, last1, first2, last2, pred,
first1 // sprout::distance(first1, last1) / 2, last1, last1,
) // first1
; // )
} // ;
// }
template<typename ForwardIterator1> template<typename ForwardIterator1>
inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator1, ForwardIterator1> inline SPROUT_CONSTEXPR sprout::pair<ForwardIterator1, ForwardIterator1>

View file

@ -14,6 +14,7 @@
#include <sprout/iterator/operation.hpp> #include <sprout/iterator/operation.hpp>
#include <sprout/algorithm/fixed/result_of.hpp> #include <sprout/algorithm/fixed/result_of.hpp>
#include <sprout/algorithm/fixed/swap_element.hpp> #include <sprout/algorithm/fixed/swap_element.hpp>
#include <sprout/algorithm/fixed/reverse_copy.hpp>
#include <sprout/algorithm/fixed/reverse.hpp> #include <sprout/algorithm/fixed/reverse.hpp>
#include <sprout/sub_array/sub_array.hpp> #include <sprout/sub_array/sub_array.hpp>
#include <sprout/utility/pair/pair.hpp> #include <sprout/utility/pair/pair.hpp>

View file

@ -14,6 +14,7 @@
#include <sprout/iterator/operation.hpp> #include <sprout/iterator/operation.hpp>
#include <sprout/algorithm/fixed/result_of.hpp> #include <sprout/algorithm/fixed/result_of.hpp>
#include <sprout/algorithm/fixed/swap_element.hpp> #include <sprout/algorithm/fixed/swap_element.hpp>
#include <sprout/algorithm/fixed/reverse_copy.hpp>
#include <sprout/algorithm/fixed/reverse.hpp> #include <sprout/algorithm/fixed/reverse.hpp>
#include <sprout/sub_array/sub_array.hpp> #include <sprout/sub_array/sub_array.hpp>
#include <sprout/utility/pair/pair.hpp> #include <sprout/utility/pair/pair.hpp>

View file

@ -20,7 +20,7 @@
// //
#ifndef SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT #ifndef SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT
# if defined(__clang__) # if defined(__clang__)
# if (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_major__ <= 2)) # if (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ <= 2))
# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 512 # define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 512
# else # else
# define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 256 # define SPROUT_RECURSIVE_FUNCTION_TEMPLATE_INSTANTIATION_LIMIT 256