add common sort

This commit is contained in:
chatlanin
2023-08-14 21:11:39 +03:00
parent 1242044571
commit 86ac6b451d
5 changed files with 64 additions and 1 deletions

22
bin/algorithms/main.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include <vector>
#include <forward_list>
#include "hack/logger/logger.hpp"
#include "hack/algorithms/sort.hpp"
auto main(int argc, char *argv[]) -> int
{
{// ex: sort
std::vector<int> v { 4, 4, 6, 1, 4, 3, 2 };
std::forward_list<int> l { 8, 7, 5, 9, 0, 1, 3, 2, 6, 4 };
hack::algorithms::sort(v);
hack::algorithms::sort(l);
hack::log log;
log(v);
log(l);
}
}

View File

@@ -1,6 +1,6 @@
executable(
'hack',
'utils/main.cpp',
'algorithms/main.cpp',
dependencies : deps,
cpp_args: args,
include_directories : inc