See discussion in https://cplusplus.github.io/LWG/issue4239 std::flat_map<std::string, int, std::less<>> m; m.try_emplace("abc", 5); // hard error The reason is that we specify in 23.6.8.7 [flat.map.modifiers]/p21 the effect to be as if `ranges::upper_bound` is called. `ranges::upper_bound` requires indirect_strict_weak_order, which requires the comparator to be invocable for all combinations. In this case, it requires const char (&)[4] < const char (&)[4] to be well-formed, which is no longer the case in C++26 after https://wg21.link/P2865R6. This patch uses `std::upper_bound` instead.