#define UNIT r4_sort #include #include auto selectsort = []( std::vector< int > &to_sort, auto cmp ) { for ( auto i = to_sort.begin(); i != to_sort.end(); ++ i ) std::swap( *i, *std::min_element( i, to_sort.end(), cmp ) ); }; #include "test_main.cpp"