Using an existing namespace as an alias for a namespace part of the std namespace (as done in ranges) has been done before, see namespace fs, an alias to std::filesystem (here).
While the comment in wallet.cpp did mention that there would be a better way to do the cast than in C++17, the method to do so, using std::chrono::clock_cast, has still not been implemented in Clang (source). The issue has been sidestepped by not using std::time_t at all and instead relying on fs::file_time_type, the type returned by fs::last_write_time.
Breaking changes
None expected.
Checklist
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas (note: N/A)
[x] I have added or updated relevant unit/integration/functional/e2e tests (note: N/A)
[x] I have made corresponding changes to the documentation (note: N/A)
[x] I have assigned this pull request to a milestone (for repository code-owners and collaborators only)
Additional Information
Depends on https://github.com/dashpay/dash/pull/6377
Using an existing namespace as an alias for a namespace part of the
std
namespace (as done inranges
) has been done before, see namespacefs
, an alias tostd::filesystem
(here).While the comment in
wallet.cpp
did mention that there would be a better way to do the cast than in C++17, the method to do so, usingstd::chrono::clock_cast
, has still not been implemented in Clang (source). The issue has been sidestepped by not usingstd::time_t
at all and instead relying onfs::file_time_type
, the type returned byfs::last_write_time
.Breaking changes
None expected.
Checklist