Enrico Forestieri wrote:
On Thu, Nov 08, 2007 at 06:05:20AM -0000, [EMAIL PROTECTED] wrote:
Author: forenr
Date: Thu Nov 8 07:05:19 2007
New Revision: 21513
URL: http://www.lyx.org/trac/changeset/21513
Log:
Fix problems with odocstream on "exotic" systems caused by the strfwd gimmick.
* src/support/docstream.{cpp,h}:
Move insertion operator for char types from docstream.h to
docstream.cpp and compile it only when USE_WCHAR_T is not defined.
* src/support/strfwd.h:
Implement forward declarations in standard C++ way.
Abdel, I am not sure it is ok with MSVC. Can you confirm it?
This did the trick:
Author: younes
Date: Thu Nov 8 08:47:31 2007
New Revision: 21514
URL: http://www.lyx.org/trac/changeset/21514
Log:
Fix compilation for MSVC.
Modified:
lyx-devel/trunk/src/support/strfwd.h
Modified: lyx-devel/trunk/src/support/strfwd.h
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/support/strfwd.h?rev=21514
==============================================================================
--- lyx-devel/trunk/src/support/strfwd.h (original)
+++ lyx-devel/trunk/src/support/strfwd.h Thu Nov 8 08:47:31 2007
@@ -30,10 +30,21 @@
#include<iosfwd>
+#ifdef _MSC_VER
+namespace std {
+template<typename Char, typename Traits, typename Alloc> class
basic_string;
+typedef basic_string<char, char_traits<char>, allocator<char> > string;
+}
+#endif
+
namespace lyx {
/// String type for storing the main text in UCS4 encoding
+#ifdef _MSC_VER
+typedef std::basic_string<char_type, std::char_traits<char_type>,
std::allocator<char_type> > docstring;
+#else
typedef std::basic_string<char_type> docstring;
+#endif
/// Base class for UCS4 input streams
typedef std::basic_istream<char_type> idocstream;