I need to use data structures like unordered_map within my code in network simulator NS-3. It is using waf builder to compile the source code. I am confused that where should I add -std=c++0x to be added to compiler flags? I tried appending it to CXXFlags in main wscript file using:
module.env.append_value('CXXFLAGS', '-std=c++0x');
But still I am getting this error:
This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options. C/C++ Problem
Should I also add any library to my waf module as well?
P.S: My GCC version is 4.4
Update: After updating to 4.7 I get this error:
error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
Is there a way to tell compiler to use 0x instead of 11?