From a76aadc0682d0841c8c87c6f25fec1d8675918d3 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Thu, 18 Sep 2025 23:11:32 +0300 Subject: [PATCH] add filesystem path --- bin/examples/exception/main.cpp | 1 + src/hack/logger/logger.hpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/bin/examples/exception/main.cpp b/bin/examples/exception/main.cpp index 0d9863b..1bb8eb6 100644 --- a/bin/examples/exception/main.cpp +++ b/bin/examples/exception/main.cpp @@ -15,6 +15,7 @@ auto main(int argc, char *argv[]) -> int e.set("int", 1); e.set("float", 1.13f); e.set("double", 1.23); + e.set("file", std::filesystem::path("/tes/path/to_file.txt")); // struct user_type // { diff --git a/src/hack/logger/logger.hpp b/src/hack/logger/logger.hpp index 7d782d1..daf2f3c 100755 --- a/src/hack/logger/logger.hpp +++ b/src/hack/logger/logger.hpp @@ -3,6 +3,7 @@ #include // C++20 #include #include +#include #include "hack/utils/color.hpp" #include "hack/patterns/singleton.hpp" #include "hack/concepts/concepts.hpp" @@ -249,6 +250,10 @@ namespace hack // по этому пише так: print_t(std::any_cast(value).c_str()); } + else if (value.type() == typeid(std::filesystem::path)) + print_t(std::any_cast(value).c_str()); + // конец HERE выше + else if (value.type() == typeid(int)) print_t(std::any_cast(value)); else if (value.type() == typeid(double))