[libcxx-commits] [libcxx] [libc++][chrono] Loads tzdata.zi in tzdb. (PR #74928)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 6 11:29:36 PST 2024
================
@@ -37,7 +37,14 @@ int main(int, const char**) {
tzdb.version = "version";
assert(tzdb.version == "version");
- // TODO TZDB add the other data members
+ // TODO TZDB update the tests above to use this style.
+ { [[maybe_unused]] std::same_as<std::string> auto _ = tzdb.version = "version"; }
+ { [[maybe_unused]] std::same_as<std::vector<std::chrono::time_zone>> auto& _ = tzdb.zones; }
+ tzdb.zones.clear(); // is it a non-const member?
----------------
ldionne wrote:
I would suggest doing `std::vector<std::chrono::time_zone>& zones = tzdb.zones;` -- that ensures the right type and looks a bit more straightforward to me.
https://github.com/llvm/llvm-project/pull/74928
More information about the libcxx-commits
mailing list