diff options
author | <shinichiro.hamaji@gmail.com> | 2013-02-18 10:45:46 +0000 |
---|---|---|
committer | <shinichiro.hamaji@gmail.com> | 2013-02-18 10:45:46 +0000 |
commit | a106e61178d55c4d3b296c332d3f8c1eb43bcc1e (patch) | |
tree | c73aa1028b931ba5887429e1c6be838b13deaeaf /src/stl_logging_unittest.cc | |
parent | cba9095278bc381177c8e90fcc0f537e1740c9d9 (diff) | |
download | glog-a106e61178d55c4d3b296c332d3f8c1eb43bcc1e.tar.gz glog-a106e61178d55c4d3b296c332d3f8c1eb43bcc1e.tar.bz2 glog-a106e61178d55c4d3b296c332d3f8c1eb43bcc1e.zip |
Support unordered_(map|set) by stl_logging
git-svn-id: https://google-glog.googlecode.com/svn/trunk@134 eb4d4688-79bd-11dd-afb4-1d65580434c0
Diffstat (limited to 'src/stl_logging_unittest.cc')
-rw-r--r-- | src/stl_logging_unittest.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/stl_logging_unittest.cc b/src/stl_logging_unittest.cc index 5dcbc44..fcae9ad 100644 --- a/src/stl_logging_unittest.cc +++ b/src/stl_logging_unittest.cc @@ -31,6 +31,14 @@ #ifdef HAVE_USING_OPERATOR +#ifdef __GNUC__ +// C++0x isn't enabled by default. +// # define GLOG_STL_LOGGING_FOR_UNORDERED +# define GLOG_STL_LOGGING_FOR_TR1_UNORDERED +# define GLOG_STL_LOGGING_FOR_EXT_HASH +# define GLOG_STL_LOGGING_FOR_EXT_SLIST +#endif + #include "glog/stl_logging.h" #include <iostream> @@ -39,16 +47,11 @@ #include <string> #include <vector> -#ifdef __GNUC__ -# include <ext/hash_map> -# include <ext/hash_set> -#endif - #include "glog/logging.h" #include "googletest.h" using namespace std; -#ifdef __GNUC__ +#ifdef GLOG_STL_LOGGING_FOR_EXT_HASH using namespace __gnu_cxx; #endif @@ -83,7 +86,7 @@ void TestSTLLogging() { CHECK_EQ(m, copied_m); // This must compile. } -#ifdef __GNUC__ +#ifdef GLOG_STL_LOGGING_FOR_EXT_HASH { // Test a hashed simple associative container. hash_set<int> hs; @@ -98,7 +101,7 @@ void TestSTLLogging() { } #endif -#ifdef __GNUC__ +#ifdef GLOG_STL_LOGGING_FOR_EXT_HASH { // Test a hashed pair associative container. hash_map<int, string> hm; @@ -145,7 +148,7 @@ void TestSTLLogging() { CHECK_EQ(m, copied_m); // This must compile. } -#ifdef __GNUC__ +#ifdef GLOG_STL_LOGGING_FOR_EXT_HASH { // Test a hashed simple associative container. // Use a user defined hash function. |