[libcxx-commits] [libcxx] [libc++][test] Avoid narrowing operations in `pair`'s constructors for tests for `flat_(multi)map` whenever feasible (PR #131284)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 25 22:51:16 PDT 2025
================
@@ -31,19 +31,19 @@ using PC = std::pair<const int, long>;
void test_copy() {
{
- std::flat_map<long, short> source = {{1, 2}, {2, 3}};
+ std::flat_map<long, short> source = {{1, static_cast<short>(2)}, {2, static_cast<short>(3)}};
----------------
frederick-vs-ja wrote:
Now I'm switching to `short{N}` for short.
https://github.com/llvm/llvm-project/pull/131284
More information about the libcxx-commits
mailing list