Patrick Palka
91ed3248ce
libstdc++: Fix flat_map::operator[] for const lvalue keys [PR120432]
...
The const lvalue operator[] overload wasn't properly forwarding the key
type to the generic overload, causing a hard error for const keys.
Rather than correcting the forwarded type this patch just makes the
non-template overloads call try_emplace directly instead. That way we
can remove the non-standard same_as constraint on the generic overload
and match the spec more closely.
PR libstdc++/120432
libstdc++-v3/ChangeLog:
* include/std/flat_map (flat_map::operator[]): Make the
non-template overloads call try_emplace directly. Remove
non-standard same_as constraint on the template overload.
* testsuite/23_containers/flat_map/1.cc (test08): New test.
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com >
Reviewed-by: Jonathan Wakely <jwakely@redhat.com >
2025-06-06 09:34:17 -04:00
..
2025-06-04 10:29:47 -04:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-03-08 19:47:15 +01:00
2025-05-30 10:02:29 +01:00
2025-06-03 10:53:00 +01:00
2025-04-29 10:52:59 +01:00
2025-04-29 10:52:59 +01:00
2025-03-12 17:02:12 +00:00
2025-01-02 11:59:57 +01:00
2025-05-15 16:33:16 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-04-11 13:56:03 +02:00
2025-01-02 11:59:57 +01:00
2025-05-12 09:15:34 -04:00
2025-01-02 11:59:57 +01:00
2025-06-06 09:34:17 -04:00
2025-04-29 08:21:35 -04:00
2025-06-05 14:43:48 +01:00
2025-04-11 13:56:03 +02:00
2025-01-02 11:59:57 +01:00
2025-05-26 11:25:28 +02:00
2025-04-25 11:47:12 +01:00
2025-04-24 22:22:33 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-05-30 10:02:28 +01:00
2025-01-02 11:59:57 +01:00
2025-04-11 13:56:03 +02:00
2025-01-02 11:59:57 +01:00
2025-04-11 13:56:03 +02:00
2025-05-27 11:12:25 +02:00
2025-06-02 13:47:28 +02:00
2025-01-02 11:59:57 +01:00
2025-05-12 12:26:53 +01:00
2025-01-02 11:59:57 +01:00
2025-05-06 17:19:26 +01:00
2025-02-28 10:15:45 -05:00
2025-04-28 11:03:50 +02:00
2025-04-28 11:03:50 +02:00
2025-04-25 13:02:04 +02:00
2025-01-02 11:59:57 +01:00
2025-05-19 10:44:38 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-06-06 09:52:31 +01:00
2025-04-11 13:56:03 +02:00
2025-03-06 16:46:19 +00:00
2025-01-02 11:59:57 +01:00
2025-03-06 16:13:30 +00:00
2024-12-13 13:06:12 +00:00
2025-06-04 23:19:52 -04:00
2025-04-25 13:02:04 +02:00
2025-02-27 22:03:50 +00:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-06-03 11:24:15 +01:00
2025-01-02 11:59:57 +01:00
2025-04-11 13:56:03 +02:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2024-11-11 18:57:16 +00:00
2025-04-25 13:02:04 +02:00
2025-03-31 17:12:26 +01:00
2025-06-03 11:21:02 +01:00
2025-01-02 11:59:57 +01:00
2025-04-11 13:56:03 +02:00
2025-04-11 13:56:03 +02:00
2025-05-14 11:27:38 +03:00
2025-01-02 11:59:57 +01:00
2025-01-02 11:59:57 +01:00
2025-04-11 13:56:03 +02:00
2025-01-02 11:59:57 +01:00