Boost logo

Boost :

From: Davlet Panech (dp1978x_lists_at_[hidden])
Date: 2004-12-13 15:52:47


Workaround for an internal compiler error in VC6 when compiled with
STLport iostreams.


--- boost/date_time/date_formatting.hpp.orig 2004-12-13 14:09:35.404548400 -0500
+++ boost/date_time/date_formatting.hpp 2004-12-12 17:42:53.000000000 -0500
@@ -27,7 +27,16 @@
   template<class month_type, class format_type, class charT=char>
   class month_formatter
   {
- public:
+// Workaround for ICE in MSVC 6 when building with STLport IOstreams
+#if defined (BOOST_MSVC) && BOOST_MSVC <= 1200 && \
+ (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && \
+ !defined (_STLP_NO_OWN_IOSTREAMS)
+ private:
+ typedef std::basic_ostream<charT> _ostream_type;
+ public:
+ static _ostream_type &format_month(const month_type& month, _ostream_type &os)
+#else
+ public:
     //! Formats a month as as string into an ostream
     /*! This function demands that month_type provide
      * functions for converting to short and long strings
@@ -35,6 +44,7 @@
      */
     static std::basic_ostream<charT>& format_month(const month_type& month,
                                       std::basic_ostream<charT>& os)
+#endif
     {
       switch (format_type::month_format())
       {


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk