Skip to content

Commit 5a32537

Browse files
committed
fix(template): resolve ambiguous std::to_string with explicit int64_t cast
- cast file_time_type::duration::count() to std::int64_t - fix libc++ ambiguity on macOS - ensure deterministic source signature generation
1 parent aff74ca commit 5a32537

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/FileSystemLoader.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
#include <vix/template/FileSystemLoader.hpp>
1717
#include <vix/template/Error.hpp>
1818

19+
#include <cstdint>
20+
#include <filesystem>
1921
#include <fstream>
2022
#include <sstream>
2123
#include <utility>
22-
#include <filesystem>
2324

2425
namespace vix::template_
2526
{
@@ -78,17 +79,15 @@ namespace vix::template_
7879
const std::string path = join_path(root_, name);
7980

8081
std::error_code ec;
81-
82-
const fs::file_time_type last_write =
83-
fs::last_write_time(path, ec);
82+
const fs::file_time_type last_write = fs::last_write_time(path, ec);
8483

8584
if (ec)
8685
{
8786
return {};
8887
}
8988

90-
const auto since_epoch =
91-
last_write.time_since_epoch().count();
89+
const std::int64_t since_epoch =
90+
static_cast<std::int64_t>(last_write.time_since_epoch().count());
9291

9392
return std::to_string(since_epoch);
9493
}

0 commit comments

Comments
 (0)