Browse files

Fix the build on OS X Mavericks

  • Loading branch information...
1 parent 7b6780f commit 7541fac245b47cce023ba4b12b4216e671508780 @ridiculousfish ridiculousfish committed Aug 21, 2013
Showing with 7 additions and 3 deletions.
  1. +7 −3 io.h
10 io.h
@@ -2,12 +2,16 @@
#define FISH_IO_H
#include <vector>
-#if __cplusplus > 199711L
-// C++11
+// Note that we have to include something to get any _LIBCPP_VERSION defined so we can detect libc++
+// So it's key that vector go above. If we didn't need vector for other reasons, we might include ciso646, which does nothing
+#if defined(_LIBCPP_VERSION) || __cplusplus > 199711L
+// C++11 or libc++ (which is a C++11-only library, but the memory header works OK in C++03)
#include <memory>
using std::shared_ptr;
-// C++03
+// C++03 or libstdc++
#include <tr1/memory>
using std::tr1::shared_ptr;

0 comments on commit 7541fac

Please sign in to comment.