[PR #15484] Modernize til::static_map with C++20 #30651

Open
opened 2026-01-31 09:42:07 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15484

State: closed
Merged: Yes


I wanted to show til::static_map to someone and noticed it hasn't been
updated since we updated to C++20. We can now make use of constexpr
std::sort and constinit to skip the initialization of the maps in
KeyChordSerialization.cpp. Also, I removed the comparator argument
to make the map a little more compact.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/15484 **State:** closed **Merged:** Yes --- I wanted to show `til::static_map` to someone and noticed it hasn't been updated since we updated to C++20. We can now make use of `constexpr` `std::sort` and `constinit` to skip the initialization of the maps in `KeyChordSerialization.cpp`. Also, I removed the comparator argument to make the map a little more compact.
claunia added the pull-request label 2026-01-31 09:42:07 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30651