aboutsummaryrefslogtreecommitdiffhomepage
path: root/io.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-21 14:41:12 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-21 14:41:12 -0700
commit7541fac245b47cce023ba4b12b4216e671508780 (patch)
tree30d7200871adf76e93414813eb863dd9d5d537d1 /io.h
parent7b6780f712abc45637bf0a049a6b7b2ec233172f (diff)
Fix the build on OS X Mavericks
Diffstat (limited to 'io.h')
-rw-r--r--io.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/io.h b/io.h
index d4a0fada..17e2b342 100644
--- a/io.h
+++ b/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;
#else
-// C++03
+// C++03 or libstdc++
#include <tr1/memory>
using std::tr1::shared_ptr;
#endif