https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90546
--- Comment #1 from Nick Krempel <ndkrempel at gmail dot com> --- My interpretation of the standard didn't take into account the reference to http://eel.is/c++draft/over.match.ref when determining the type A. It says that A will be "lvalue reference to cv2 T2 ... where cv1 T is reference-compatible with cv2 T2". Here "cv1 T" is "const Foo". This seems to allows cv2 T2 to be either "Foo" or "const Foo", hence A can be either "Foo&" or "const Foo&". It's not clear which is supposed to be picked for use in the template argument deduction in that case! It seems it was expected for there to be a unique type from the wording: "... with the type that is required as the result of the conversion (call it A; ..." (note "*the* type", "call *it* A").