OSDN Git Service

Merge basic-improvements-branch to trunk
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / bits / sstream.tcc
index fd56347..b5848d8 100644 (file)
@@ -91,7 +91,7 @@ namespace std
        {
          if (!__testeof)
            {
-             __size_type __len = max(_M_buf_size, _M_buf_size_opt);
+             __size_type __len = std::max(_M_buf_size, _M_buf_size_opt);
              __len *= 2;
 
              if (__testwrite)
@@ -184,7 +184,7 @@ namespace std
       
       if (_M_buf_size)
        {
-         off_type __pos = __sp._M_position();
+         off_type __pos = __sp; // Use streamoff operator to do conversion.
          char_type* __beg = NULL;
          char_type* __end = NULL;
          bool __testin = (ios_base::in & _M_mode & __mode) != 0;
@@ -226,13 +226,16 @@ namespace std
   // which are defined via explicit instantiations elsewhere.  
   // NB:  This syntax is a GNU extension.
   extern template class basic_stringbuf<char>;
-  extern template class basic_stringbuf<wchar_t>;
   extern template class basic_istringstream<char>;
-  extern template class basic_istringstream<wchar_t>;
   extern template class basic_ostringstream<char>;
-  extern template class basic_ostringstream<wchar_t>;
   extern template class basic_stringstream<char>;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  extern template class basic_stringbuf<wchar_t>;
+  extern template class basic_istringstream<wchar_t>;
+  extern template class basic_ostringstream<wchar_t>;
   extern template class basic_stringstream<wchar_t>;
+#endif
 } // namespace std
 
 #endif