I am using an unordered_map
which is included as:
#include <unordered_map>
and the program is compiled as follows:
g++ Test.cc -std=gnu++0x -o test
Am I using the unordered_map
of TR1 or that of C++0x. Or is it both the same?
I believe gcc puts their TR1 headers in <tr1/unordered_map>
, so you should be getting the C++11 version. But they are very similar.
GCC has tr1 headers in tr1 subdirectory. Plus there is the tr1 namespace.
#include <tr1/unordered_map>
...
std::tr1::unordered_map<...>(...);
So unless you specifically did these things or did a similar "using" you've got the std ones.
The implementations are split but they are rather similar. There were just enough differences (initializer_list, comparison ops) to make maintenance of one file with all the conditionals and macros a pain.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With