Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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