Fix export.cpp compilation with MSVC (#1737)

This commit is contained in:
Cheng 2024-12-29 23:56:30 +09:00 committed by GitHub
parent 4ba0c24a8f
commit 8ecdfb718b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 12 deletions

View File

@ -9,17 +9,13 @@
#define TOSTRING(x) STRINGIFY(x)
// clang-format off
#define SERIALIZE_PRIMITIVE(primitive, keys...) \
{ \
#primitive, { \
[](Writer& os, const Primitive& p) { \
serialize_primitive<primitive>(os, p); \
}, \
[](Reader& is, Stream s) { \
return deserialize_primitive<primitive>(is, s); \
}, \
{keys} \
} \
#define SERIALIZE_PRIMITIVE(primitive, ...) \
{ \
#primitive, { \
serialize_primitive<primitive>, \
deserialize_primitive<primitive>, \
{__VA_ARGS__} \
} \
}
// clang-format on

View File

@ -13,7 +13,7 @@ using namespace mlx::core;
namespace {
std::string get_temp_file(const std::string& name) {
return std::filesystem::temp_directory_path().append(name);
return std::filesystem::temp_directory_path().append(name).string();
}
} // namespace