https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103304
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- N.B. the same applies to printf: you included <cstdio> so you should be using std::printf. Or you should include <stdio.h> Stop including C++ headers that put names in namespace std and then using them as though they are not in namespace std. That is not guaranteed to work.