From edb6c9ede41f470427f1574cdae8d7b41be1d320 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 8 Nov 2007 13:32:56 +0000 Subject: [PATCH] Always forward declare string as it is not guaranteed that the iosfwd header already does it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21518 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/strfwd.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/support/strfwd.h b/src/support/strfwd.h index 55cc4ccbd8..3f982ca266 100644 --- a/src/support/strfwd.h +++ b/src/support/strfwd.h @@ -28,23 +28,23 @@ namespace lyx { typedef boost::uint32_t char_type; } #endif -#include +#include + +// We have to forward declare the string type as not all compilers +// do that in the iosfwd header. +namespace std +{ -#ifdef _MSC_VER -namespace std { template class basic_string; typedef basic_string, allocator > string; + } -#endif namespace lyx { /// String type for storing the main text in UCS4 encoding -#ifdef _MSC_VER -typedef std::basic_string, std::allocator > docstring; -#else -typedef std::basic_string docstring; -#endif +typedef std::basic_string, + std::allocator > docstring; /// Base class for UCS4 input streams typedef std::basic_istream idocstream;