Date
2021-03-09.00:00:00
Message id
11740

Content

The resolution for LWG 3025 enabled code like the following to be accepted:

map m1{{pair{1, 2}, {3, 4}}, less<int>()};

but breaks code that had been previously working like the following

using value_type = pair<const int, int>;

map m2{{value_type{1, 2}, {3, 4}}, less<int>()};

as shown on godbolt.

[Acknowledgment to Tim Song and Arthur O'Dwyer for independently pointing out this case on the LWG mailing list]