#ifdef HAVE_USING_OPERATOR
-#include "glog/stl_logging.h"
-
+#include <functional>
#include <iostream>
#include <map>
#include <ostream>
#include <vector>
#ifdef __GNUC__
-# include <ext/hash_map>
-# include <ext/hash_set>
+// C++0x isn't enabled by default in GCC and libc++ does not have
+// non-standard ext/* and tr1/unordered_*.
+# if defined(_LIBCPP_VERSION)
+# ifndef GLOG_STL_LOGGING_FOR_UNORDERED
+# define GLOG_STL_LOGGING_FOR_UNORDERED
+# endif
+# else
+# ifndef GLOG_STL_LOGGING_FOR_EXT_HASH
+# define GLOG_STL_LOGGING_FOR_EXT_HASH
+# endif
+# ifndef GLOG_STL_LOGGING_FOR_EXT_SLIST
+# define GLOG_STL_LOGGING_FOR_EXT_SLIST
+# endif
+# ifndef GLOG_STL_LOGGING_FOR_TR1_UNORDERED
+# define GLOG_STL_LOGGING_FOR_TR1_UNORDERED
+# endif
+# endif
#endif
#include "glog/logging.h"
+#include "glog/stl_logging.h"
#include "googletest.h"
using namespace std;
-#ifdef __GNUC__
+#ifdef GLOG_STL_LOGGING_FOR_EXT_HASH
using namespace __gnu_cxx;
#endif
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;
}
#endif
-#ifdef __GNUC__
+#ifdef GLOG_STL_LOGGING_FOR_EXT_HASH
{
// Test a hashed pair associative container.
hash_map<int, string> hm;
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.