Landing: ea57201777f8
Project / Subsystem
gcc / libstdc++
Date
2026-05-21
Author
Patrick Palka
Commit
ea57201777f8cb58766953f87880bcf89244411b
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- ea57201777f8cb58766953f87880bcf89244411b
- source_type
- github
- headline
- Libstdc++: Fix recent std::flat_map test with COW std::string
- tldr
- The std::flat_map test is fixed to disable constant evaluation when std::string is not constexpr.
- author
- Patrick Palka
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • testsuite
- • flat_map
- • constexpr
- • std::string
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-21T00:00:00.000Z
A recent test added for std::flat_map in libstdc++ used std::string in a context requiring constant evaluation. However, std::string is not always constexpr, particularly when using a copy-on-write (COW) implementation. This commit fixes the test by disabling constant evaluation when std::string is not constexpr, ensuring the test passes in all configurations.