add filesystem path
This commit is contained in:
@@ -15,6 +15,7 @@ auto main(int argc, char *argv[]) -> int
|
|||||||
e.set("int", 1);
|
e.set("int", 1);
|
||||||
e.set("float", 1.13f);
|
e.set("float", 1.13f);
|
||||||
e.set("double", 1.23);
|
e.set("double", 1.23);
|
||||||
|
e.set("file", std::filesystem::path("/tes/path/to_file.txt"));
|
||||||
|
|
||||||
// struct user_type
|
// struct user_type
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <source_location> // C++20
|
#include <source_location> // C++20
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <filesystem>
|
||||||
#include "hack/utils/color.hpp"
|
#include "hack/utils/color.hpp"
|
||||||
#include "hack/patterns/singleton.hpp"
|
#include "hack/patterns/singleton.hpp"
|
||||||
#include "hack/concepts/concepts.hpp"
|
#include "hack/concepts/concepts.hpp"
|
||||||
@@ -249,6 +250,10 @@ namespace hack
|
|||||||
// по этому пише так:
|
// по этому пише так:
|
||||||
print_t(std::any_cast<std::string>(value).c_str());
|
print_t(std::any_cast<std::string>(value).c_str());
|
||||||
}
|
}
|
||||||
|
else if (value.type() == typeid(std::filesystem::path))
|
||||||
|
print_t(std::any_cast<std::filesystem::path>(value).c_str());
|
||||||
|
// конец HERE выше
|
||||||
|
|
||||||
else if (value.type() == typeid(int))
|
else if (value.type() == typeid(int))
|
||||||
print_t(std::any_cast<int>(value));
|
print_t(std::any_cast<int>(value));
|
||||||
else if (value.type() == typeid(double))
|
else if (value.type() == typeid(double))
|
||||||
|
|||||||
Reference in New Issue
Block a user