add primary container and concepts for logger

This commit is contained in:
2025-09-10 00:10:30 +03:00
parent 86d4535401
commit 057dc595ac
5 changed files with 246 additions and 81 deletions

View File

@@ -1,4 +1,6 @@
#include <vector>
#include <set>
#include <unordered_set>
#include <map>
#include "hack/logger/logger.hpp"
@@ -9,15 +11,48 @@ auto main(int argc, char *argv[]) -> int
double d = 2.0;
float f = 3.f;
std::vector<std::string> vs = { "a", "b", "c" };
std::list<int> l = { 1, 2, 3 };
std::deque<float> df = { 1.1f, 2.1f, 3.1f };
std::forward_list<int> fl = { 1, 2, 3 };
std::map<int, int> mi = { { 1, 1 }, { 2, 2 }, { 3, 3 } };
std::multimap<int, int> mmi = { { 1, 1 }, { 1, 1 }, { 2, 2 }, { 3, 3 } };
std::unordered_map<int, int> umi = { { 1, 1 }, { 1, 1 }, { 2, 2 }, { 3, 3 } };
std::tuple<int, std::string, bool> tp = { 1, "asdf", false };
std::stack<int> sti;
sti.push(1);
sti.push(2);
sti.push(3);
std::set<int> si = { 1, 2, 3 };
std::unordered_set<int> usi = { 1, 1, 1 };
hack::log().set_devider(", ");
hack::log().no_func();
hack::log()(1, 2, 3.1f, 4.3, "asdf", "qwer", "xzcv");
hack::log()(1, i, 3.1f, f, 4.3, d, "asdf");
hack::log().set_devider(" = ");
hack::log()(1, 2, 3.1f, 4.3, "asdf", "qwer", "xzcv");
hack::log()(1, i, 3.1f, f, 4.3, d, "asdf");
hack::log().reset();
hack::log()(1, 2, 3.1f, 4.3, "asdf", "qwer", "xzcv");
hack::log()(1, i, 3.1f, f, 4.3, d, "asdf");
hack::log().set_devider(", ");
hack::log().no_func();
hack::log().no_file();
hack::log().no_row();
hack::log()(vs);
hack::log()(l);
hack::log()(df);
hack::log()(fl);
hack::log().reset();
hack::log()(mi);
hack::log()(mmi);
hack::log()(umi);
hack::log()(tp);
hack::log()(true);
hack::log().bool_as_number();
hack::log()(true);
hack::log()(si);
hack::log()(usi);
hack::log().reset();
hack::log().set_devider(", ");
hack::log()(sti, 123, true);
return 0;
}