#include "support/docstring.h"
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+// Ugly workaround for MSVC10 STL bug:
+// std::numpunct has a hardcoded dllimport in definition, but we wanna it with 32 bit
+// so we can't import it and must define it but then the compiler complains.
+#include "support/numpunct_lyx_char_type.h"
+#endif
+
#include <fstream>
#include <sstream>
};
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
-extern template class std::numpunct<lyx::char_type>;
-#endif
/// UCS4 input stringstream
typedef std::basic_istringstream<char_type> idocstringstream;
--- /dev/null
+// -*- C++ -*-\r
+/**\r
+ * \file numpunct_lyx_char_type.h\r
+ * This file is part of LyX, the document processor.\r
+ * Licence details can be found in the file COPYING.\r
+ *\r
+ * \author Peter Kümmel\r
+ *\r
+ * Full author contact details are available in file CREDITS.\r
+ */\r
+\r
+#ifndef LYX_NUMPUNCT_LYX_CHAR_TYPE_H\r
+#define LYX_NUMPUNCT_LYX_CHAR_TYPE_H\r
+\r
+\r
+#include <locale>\r
+\r
+\r
+namespace std\r
+{\r
+\r
+ template<>\r
+ class numpunct<lyx::char_type> : public locale::facet\r
+ {\r
+ public:\r
+\r
+ typedef lyx::char_type char_type;\r
+ typedef basic_string<lyx::char_type> string_type;\r
+\r
+\r
+ static locale::id id;\r
+\r
+ explicit numpunct(size_t __refs = 0) : chared(__refs)\r
+ {}\r
+\r
+ char_type decimal_point() const\r
+ { return chared.decimal_point(); }\r
+\r
+ char_type thousands_sep() const\r
+ { return chared.thousands_sep(); }\r
+\r
+ string grouping() const\r
+ { return chared.grouping(); }\r
+\r
+ string_type truename() const\r
+ { return lyx::from_ascii(chared.truename()); }\r
+\r
+ string_type falsename() const\r
+ { return lyx::from_ascii(chared.falsename()); }\r
+\r
+\r
+ protected:\r
+ virtual ~numpunct();\r
+\r
+\r
+ private:\r
+ numpunct<char> chared;\r
+\r
+ };\r
+\r
+\r
+\r
+}\r
+#endif\r