I\'m on Windows 10 with MinGW, and recently updated my g++, using mingw-get update and mingw-get upgrade. This error occurred, even af
g++
mingw-get update
mingw-get upgrade
The accepted answer is hardly a solution. Having to set the C++ standard version should not be required.
I strongly suggest you try the MinGW-w64 GCC, which does not have this problem (or at least I haven't seen it reported or experienced it myself).