dimanche 12 mars 2017

Code Blocks throws error with std::array even when C++11 is enabled

I have enabled the option Have g++ follow the C++11 ISO C++ language standard [-std=c++11], under Compiler Flags in my Code Blocks IDE. However, when I try to use:

std::array<float, dim> w_state;

It throws error:

error: 'array' in namespace 'std' does not name a template type

Why does this happen? I believe the problem is with the IDE.

Aucun commentaire:

Enregistrer un commentaire