Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76824 - trunk/boost
From: antoshkka_at_[hidden]
Date: 2012-02-01 12:08:11


Author: apolukhin
Date: 2012-02-01 12:08:10 EST (Wed, 01 Feb 2012)
New Revision: 76824
URL: http://svn.boost.org/trac/boost/changeset/76824

Log:
Disabling some optimisations for sun cc
Bug described in #6462
Text files modified:
   trunk/boost/lexical_cast.hpp | 19 ++++++++++++++-----
   1 files changed, 14 insertions(+), 5 deletions(-)

Modified: trunk/boost/lexical_cast.hpp
==============================================================================
--- trunk/boost/lexical_cast.hpp (original)
+++ trunk/boost/lexical_cast.hpp 2012-02-01 12:08:10 EST (Wed, 01 Feb 2012)
@@ -72,7 +72,9 @@
 #include <boost/static_assert.hpp>
 #include <boost/detail/lcast_precision.hpp>
 #include <boost/detail/workaround.hpp>
+#if !defined(__SUNPRO_CC)
 #include <boost/container/container_fwd.hpp>
+#endif // !defined(__SUNPRO_CC)
 #ifndef BOOST_NO_CWCHAR
 # include <cwchar>
 #endif
@@ -170,11 +172,13 @@
         typedef CharT type;
     };
 
+#if !defined(__SUNPRO_CC)
     template<class CharT, class Traits, class Alloc>
     struct stream_char< ::boost::container::basic_string<CharT,Traits,Alloc> >
     {
         typedef CharT type;
     };
+#endif // !defined(__SUNPRO_CC)
 #endif
 
 #ifndef BOOST_LCAST_NO_WCHAR_T
@@ -289,6 +293,7 @@
             typedef Traits type;
         };
 
+#if !defined(__SUNPRO_CC)
         template<class CharT, class Traits, class Alloc, class Source>
         struct deduce_char_traits< CharT
                                  , ::boost::container::basic_string<CharT,Traits,Alloc>
@@ -342,6 +347,7 @@
         {
             typedef Traits type;
         };
+#endif // !defined(__SUNPRO_CC)
 #endif
     }
 
@@ -1364,6 +1370,7 @@
                 return true;
             }
 
+#if !defined(__SUNPRO_CC)
             template<class Alloc>
             bool operator<<(::boost::container::basic_string<CharT,Traits,Alloc> const& str)
             {
@@ -1371,7 +1378,7 @@
                 finish = start + str.length();
                 return true;
             }
-
+#endif // !defined(__SUNPRO_CC)
             bool operator<<(bool value)
             {
                 CharT const czero = lcast_char_constants<CharT>::zero;
@@ -1588,9 +1595,10 @@
 #else
             template<class Alloc>
             bool operator>>(std::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
-
+#if !defined(__SUNPRO_CC)
             template<class Alloc>
             bool operator>>(::boost::container::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
+#endif // !defined(__SUNPRO_CC)
 #endif
             /*
              * case "-0" || "0" || "+0" : output = false; return true;
@@ -1726,13 +1734,13 @@
         {
             BOOST_STATIC_CONSTANT(bool, value = true );
         };
-
+#if !defined(__SUNPRO_CC)
         template<typename CharT, typename Traits, typename Alloc>
         struct is_stdstring< ::boost::container::basic_string<CharT, Traits, Alloc> >
         {
             BOOST_STATIC_CONSTANT(bool, value = true );
         };
-
+#endif // !defined(__SUNPRO_CC)
         template<typename T>
         struct is_char_or_wchar
         {
@@ -1832,7 +1840,7 @@
         {
             BOOST_STATIC_CONSTANT(bool, value = true );
         };
-
+#if !defined(__SUNPRO_CC)
         template<typename CharT, typename Traits, typename Alloc>
         struct is_char_array_to_stdstring< ::boost::container::basic_string<CharT, Traits, Alloc>, CharT* >
         {
@@ -1844,6 +1852,7 @@
         {
             BOOST_STATIC_CONSTANT(bool, value = true );
         };
+#endif // !defined(__SUNPRO_CC)
 
 #if (defined _MSC_VER)
 # pragma warning( push )


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk