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

View File

@ -13,7 +13,7 @@ using namespace mlx::core;
namespace { namespace {
std::string get_temp_file(const std::string& name) { 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 } // namespace