Expand version api and conversions
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "Math/Timestamp.hpp"
|
||||
#include "Math/UInt24.hpp"
|
||||
#include "Base/UUID.hpp"
|
||||
#include "Base/Version.hpp"
|
||||
#include <filesystem>
|
||||
#include <fmt/chrono.h>
|
||||
|
||||
@@ -41,6 +42,19 @@ template<> struct fmt::formatter<OpenVulkano::ByteSize>
|
||||
}
|
||||
};
|
||||
|
||||
template<> struct fmt::formatter<OpenVulkano::Version>
|
||||
{
|
||||
template<typename ParseContext> constexpr auto parse(ParseContext& ctx)
|
||||
{
|
||||
return ctx.begin();
|
||||
}
|
||||
|
||||
template<typename FormatContext> auto format(const OpenVulkano::Version& version, FormatContext& ctx) const
|
||||
{
|
||||
return fmt::format_to(ctx.out(), "{}", static_cast<const std::string&>(version));
|
||||
}
|
||||
};
|
||||
|
||||
template<> struct fmt::formatter<std::filesystem::path> : fmt::formatter<std::string>
|
||||
{
|
||||
template<typename PATH = std::filesystem::path>
|
||||
|
||||
Reference in New Issue
Block a user