]> git.lyx.org Git - lyx.git/blobdiff - src/support/strfwd.h
Make GraphicsConverter threadsafe
[lyx.git] / src / support / strfwd.h
index f1dcb0bca925d4b75244a996ad9ce1fbfd7829b8..e40ec1c4b8b0beeddbced9f404507918972e45b0 100644 (file)
 #ifndef STRFWD_H
 #define STRFWD_H
 
+// This includes does nothing but defining _LIBCPP_VERSION
+// if libc++ is used (rather than libstdc++) - we first
+// check if we have at least a c++03 standard before
+// including the file
+#if (__cplusplus > 199711L)
+#include <ciso646>
+#endif
+
 #ifdef USE_WCHAR_T
 
 // Prefer this if possible because GNU libstdc++ has usable
@@ -28,6 +36,10 @@ namespace lyx { typedef boost::uint32_t char_type; }
 
 #endif
 
+// Forward definitions do not work with libc++
+#ifdef  _LIBCPP_VERSION
+#include <string>
+#else
 
 namespace std {
 
@@ -52,6 +64,7 @@ typedef basic_ostringstream<char, char_traits<char>, allocator<char> > ostringst
 
 } // namepace std
 
+#endif
 
 namespace lyx {