Skip to content

Instantly share code, notes, and snippets.

@noahm
Last active December 27, 2015 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahm/7364571 to your computer and use it in GitHub Desktop.
Save noahm/7364571 to your computer and use it in GitHub Desktop.
Mirrored attachment from https://code.google.com/p/google-glog/issues/detail?id=121#c3 for use with homebrew (edited for use as -p1)
Index: /src/stl_logging_unittest.cc
===================================================================
--- /src/stl_logging_unittest.cc (revision 136)
+++ /src/stl_logging_unittest.cc (working copy)
@@ -31,17 +31,20 @@
#ifdef HAVE_USING_OPERATOR
-#ifdef __GNUC__
+#include <iostream>
+
+#if defined(__GLIBCPP__) || defined(__GLIBCXX__)
// 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
+#elif defined(_LIBCPP_VERSION)
+# define GLOG_STL_LOGGING_FOR_UNORDERED
#endif
#include "glog/stl_logging.h"
-#include <iostream>
#include <map>
#include <ostream>
#include <string>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment