#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
#endif
+// Forward definitions do not work with libc++
+#ifdef _LIBCPP_VERSION
+#include <string>
+#else
namespace std {
template<class Char, class Traits> class basic_istream;
template<class Char, class Traits> class basic_ostream;
+template<class Char, class Traits, class Allocator> class basic_ostringstream;
typedef basic_istream<char, char_traits<char> > istream;
typedef basic_ostream<char, char_traits<char> > ostream;
+typedef basic_ostringstream<char, char_traits<char>, allocator<char> > ostringstream;
} // namepace std
+#endif
namespace lyx {
/// Base class for UCS4 output streams
typedef std::basic_ostream<char_type, std::char_traits<char_type> > odocstream;
+/// UCS4 output stringstream
+typedef std::basic_ostringstream<char_type, std::char_traits<char_type>, std::allocator<char_type> > odocstringstream;
+
#if ! defined(USE_WCHAR_T)
extern odocstream & operator<<(odocstream &, char);
#endif