Search code examples
c++netbeansstdmingw32

C++ NetBeans std::array not usable


I am using MinGW C++ compiler in a statically linked project with NetBeans.

I am trying to use std::array but it seems that when I #include <array> NetBeans doesn't recognize it. When I write std:: a list of possibilities unfolds, but the array struct is nowhere to be found.

When I Ctrl+Click the <array> standard library header, it opens (thus, it is found by the IDE)... but the declarations appear in grey for some reason...

#include <array> ----------------> If I remove the define guards (alias #ifndef -- #endif) it works fine, but... why do I have to change this header to make it work? Am I missing something? I am using "x86_64-w64-mingw32" to compile.

Any help will be appreciated.


Solution

  • Looks like the __GXX_EXPERIMENTAL_CXX0X__ macro is not defined.

    You can activate that (partial C++11 support) with the -std=c++0x compiler option.