https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101124
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Another example that now fails: #include <utility> struct X { } x; std::pair<const X, void*> p(x, 0); This selects the pair<T1,T2>::pair<U1,U2>(U1&&, U2&&) constructor, because x is non-const and the pair<T1,T2>::first_type type is const. U2 gets deduced as int, and int cannot convert to a pointer. This code is just wrong and the standard says it should not compile, it should be fixed to use p(x, nullptr). p(std::as_const(x), 0) would also work, but is gross. Just use nullptr.