stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r498795 - /incubator/stdcxx/trunk/include/sstream
Date Mon, 22 Jan 2007 20:52:47 GMT
Author: sebor
Date: Mon Jan 22 12:52:46 2007
New Revision: 498795

URL: http://svn.apache.org/viewvc?view=rev&rev=498795
Log:
2007-01-22  Martin Sebor  <sebor@roguewave.com>

	* sstream (str): Made one-argument char_type* overload public
	for efficiency since it's indistinguishable from the string
	overload (the two argument continues to be private in strict
	mode).
	(basic_stringstream ctor): Used __rw::__rw_in_out instead of
	(in | out) for efficiency and to make debugging easier (by
	avoiding the call to operator| defined by the implementation).

Modified:
    incubator/stdcxx/trunk/include/sstream

Modified: incubator/stdcxx/trunk/include/sstream
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/sstream?view=diff&rev=498795&r1=498794&r2=498795
==============================================================================
--- incubator/stdcxx/trunk/include/sstream (original)
+++ incubator/stdcxx/trunk/include/sstream Mon Jan 22 12:52:46 2007
@@ -117,7 +117,7 @@
     basic_stringbuf (const _C_string_type&,
                      ios_base::openmode = _RW::__rw_in_out);
 
-    // extension
+    // undetectable extension
     _EXPLICIT
     basic_stringbuf (const char_type*,
                      ios_base::openmode = _RW::__rw_in_out);
@@ -134,14 +134,14 @@
 
 private:
 
+#endif   // _RWSTD_NO_EXT_STRINGBUF_STR
+
     // extension
     void str (const char_type*, _RWSTD_SIZE_T);
 
-#endif   // _RWSTD_NO_EXT_STRINGBUF_STR
-
 public:
 
-    // public extension for efficiency
+    // undetectable extension for efficiency
     void str (const char_type *__s) {
         str (__s, traits_type::length (__s));
     }
@@ -250,7 +250,7 @@
         : basic_istream<char_type, traits_type>(rdbuf ()),
           _C_sb (__str, __mode | ios_base::in) { }
 
-    // extension
+    // undetectable extension
     _EXPLICIT
     basic_istringstream (const char_type   * __s, 
                          ios_base::openmode __mode = ios_base::in)
@@ -271,12 +271,17 @@
 #ifdef _RWSTD_NO_EXT_STRINGBUF_STR
 
     // extension
-    void str (const char_type *__s, _RWSTD_SIZE_T __len = _RWSTD_SIZE_MAX) {
+    void str (const char_type *__s, _RWSTD_SIZE_T __len) {
         rdbuf ()->str (__s, __len);
     }
 
 #endif   //  _RWSTD_NO_EXT_STRINGBUF_STR
 
+    // undetectable extension for efficiency
+    void str (const char_type *__s) {
+        rdbuf ()->str (__s);
+    }
+
     void str (const _C_string_type &__str) {
         rdbuf ()->str (__str);
     }
@@ -315,7 +320,7 @@
         : basic_ostream<char_type, traits_type>(rdbuf ()),
           _C_sb (__str, __mode | ios_base::out) { }
 
-    // extension
+    // undetectable extension
     _EXPLICIT
     basic_ostringstream (const char_type    *__s, 
                          ios_base::openmode  __mode = ios_base::out)
@@ -336,12 +341,17 @@
 #ifdef _RWSTD_NO_EXT_STRINGBUF_STR
 
     // extension
-    void str (const char_type *__s, _RWSTD_SIZE_T __len = _RWSTD_SIZE_MAX) {
+    void str (const char_type *__s, _RWSTD_SIZE_T __len) {
         rdbuf ()->str (__s, __len);
     }
 
 #endif   //  _RWSTD_NO_EXT_STRINGBUF_STR
 
+    // undetectable extension for efficiency
+    void str (const char_type *__s) {
+        rdbuf ()->str (__s);
+    }
+
     void str (const _C_string_type &__str) {
         rdbuf ()->str (__str);
     }
@@ -368,23 +378,20 @@
     typedef _TYPENAME traits_type::int_type off_type;
 
     _EXPLICIT
-    basic_stringstream (ios_base::openmode __mode =
-                        ios_base::out | ios_base::in)
+    basic_stringstream (ios_base::openmode __mode = _RW::__rw_in_out)
         : basic_iostream<char_type, traits_type>(rdbuf ()),
           _C_sb (__mode) { }
 
     _EXPLICIT
-    basic_stringstream (const _C_string_type &__str, 
-                        ios_base::openmode __mode = 
-                        ios_base::out | ios_base::in)
+    basic_stringstream (const _C_string_type &__str,
+                        ios_base::openmode __mode = _RW::__rw_in_out)
         : basic_iostream<char_type, traits_type>(rdbuf ()),
           _C_sb (__str, __mode) { }
 
-    // extension
+    // undetectable extension
     _EXPLICIT
     basic_stringstream (const char_type    *__s, 
-                        ios_base::openmode __mode = 
-                        ios_base::out | ios_base::in)
+                        ios_base::openmode __mode = _RW::__rw_in_out)
         : basic_iostream<char_type, traits_type>(rdbuf ()),
           _C_sb (__s, __mode) { }
 
@@ -402,11 +409,16 @@
 #ifdef _RWSTD_NO_EXT_STRINGBUF_STR
 
     // extension
-    void str (const char_type *__s, _RWSTD_SIZE_T __len = _RWSTD_SIZE_MAX) {
+    void str (const char_type *__s, _RWSTD_SIZE_T __len) {
         rdbuf ()->str (__s, __len);
     }
 
 #endif   //  _RWSTD_NO_EXT_STRINGBUF_STR
+
+    // undetectable extension for efficiency
+    void str (const char_type *__s) {
+        rdbuf ()->str (__s);
+    }
 
     void str (const _C_string_type &__str) {
         rdbuf ()->str (__str);



Mime
View raw message