https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69436
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think the problem is the two auto are considered the same. I don't know the C++ standard in these places to say if GCC should reject or accept it so I cannot comment on that.