https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116178
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Finding the latest numeric -std=c++ version isn't that hard, g++ --help -v 2>&1 | awk '{print $1}' | grep std=c[+][+][0-8][0-9] | sort -n | tail -n 1 will do it. And g++ --help -v 2>&1 | awk '{print $1}' | grep std=c[+][+][0-8][0-9a-z] | sort -n | tail -n 1 will give the latest non-numeric one (like -std=c++2c).