According to this post (
c++ - G++ updated on MingW gets massive error messages - Stack Overflow[
^]) (and others) it might be necessary to pass the option
-std=gnu++11
instead of
-std=c++11
which is probably set by CodeBlocks.
You can try to set the option as additional parameter instead of selecting the c++11 option.
If that does not help inspect the options passed to g++ on the command line (compile output). There may be other options that reset the C++11 option.
For testing you can copy the command line for compilation of one file, modify some parameters, and execute it inside a shell.