I’d like to use unordered_set without installing Boost. I tried to add --std=gnu++0x but it is not a recognized option. Does v4.1.2 include unordered_set? If so, how do I get the header file for it?
This is a Centos 4 machine.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
unordered_setis in the purview of the standard C++ library, notgcc, the compiler (although most programs built usinggccare linked againstlibstdc++).The way you generally include it is
#include <tr1/unordered_set>. Then, to use it, you must either do ausing std::tr1::unordered_set;or qualify the name each time.The C++ standard version you choose to use doesn’t have much effect because that’s the language standard, and the availability of standard library constructs is semi-independent.