Skip to content

<chrono>: Perform cleanups identified during code review #1805

@StephanTLavavej

Description

@StephanTLavavej

While reviewing #1789, @CaseyCarter noticed several things in <chrono> that could be cleaned up. None of them are correctness issues or have ABI impact, so we're filing a followup issue.

Also while reviewing #1870, @mnatsuhara identified several good cleanups. @CaseyCarter also found some things to clean up with comments in #1870 (review).

One more issue (noticed while explaining a decltype) - the occurrences of decltype(tzdb::zones) and decltype(tzdb::links) are relics of an earlier attempt to use special allocators (which was foiled by the Standard's insistence on std::allocator here). It would probably be simpler to replace these with their actual types. Example occurrences:

_NODISCARD inline tuple<string, decltype(tzdb::zones), decltype(tzdb::links)> _Tzdb_generate_time_zones() {

STL/stl/inc/chrono

Lines 2618 to 2619 in dde4623

decltype(tzdb::zones) _Time_zones;
decltype(tzdb::links) _Time_zone_links;

Metadata

Metadata

Labels

chronoC++20 chronoenhancementSomething can be improvedfixedSomething works now, yay!

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions