add common sort
This commit is contained in:
22
bin/algorithms/main.cpp
Normal file
22
bin/algorithms/main.cpp
Normal 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
executable(
|
||||
'hack',
|
||||
'utils/main.cpp',
|
||||
'algorithms/main.cpp',
|
||||
dependencies : deps,
|
||||
cpp_args: args,
|
||||
include_directories : inc
|
||||
|
||||
Reference in New Issue
Block a user