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
Thanks to @SilencePhil, I found a relevant StackOverflow answer. This question is not the same question, but has the same solution, namely to replace std=c++11 with std=gnu++11 in the call to g++.
std=c++11
std=gnu++11