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
If you are working inside CODE::BLOCKS go to Settings->Compiler. Select 'compiler settings with GNU GCC compiler' under Selected Compiler. Check the option "Have g++ follow the C++14 ISO C++ language standard [-std=c++14]" in General menu.