#pragma once #include #include #include template const char* to_cstr(const PathType &p_) { if constexpr (std::is_same_v, std::filesystem::path>) return p_.c_str(); if constexpr (std::is_same_v, std::string>) return p_.c_str(); if constexpr (std::is_same_v, const char*> || std::is_same_v, char*>) return p_; abort(); return NULL; }