This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto int_pair_gen = make_tuple_gen(int_gen(100), int_gen(1000)); | |
auto inputs_gen = make_vector_gen(50000, int_pair_gen); | |
auto less_on_second = ordering_by_index<1>(); | |
//Generate a vector of up to 50k elements | |
auto input = inputs_gen(gen); | |
//To test our sorting routine | |
auto sorted = input; | |
custom_sort(begin(sorted), end(sorted), less_on_second); | |
//Check the property of unstable sort | |
check_sort_property(input, sorted, less_on_second); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment