https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104343
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Your code is invalid. std::endl is an overloaded function, so you can't pass it as an argument like that. The template argument cannot be deduced. GCC's error could be improved though.