* bitset: explicitly convert basic_string<...>::npos to size_t in
authoroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Nov 1998 12:10:39 +0000 (12:10 +0000)
committeroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Nov 1998 12:10:39 +0000 (12:10 +0000)
default argument to constructor, to avoid parse error at `>'
(__STL_EXPLICIT_FUNCTION_TMPL_ARGS): replace #if with #ifdef

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23937 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++/stl/ChangeLog
libstdc++/stl/bitset

index e7ef065..87f26c4 100644 (file)
@@ -1,3 +1,9 @@
+1998-11-27  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * bitset: explicitly convert basic_string<...>::npos to size_t in
+       default argument to constructor, to avoid parse error at `>'
+       (__STL_EXPLICIT_FUNCTION_TMPL_ARGS): replace #if with #ifdef
+
 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
 
        * stl_alloc.h (default_alloc_template::_S_free_list): Don't
index 5660855..64fa595 100644 (file)
@@ -626,7 +626,7 @@ public:
   template<class _CharT, class _Traits, class _Alloc>
   explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s,
                   size_t __pos = 0,
-                  size_t __n = basic_string<_CharT,_Traits,_Alloc>::npos) 
+                  size_t __n = size_t(basic_string<_CharT,_Traits,_Alloc>::npos))
     : _Base() 
   {
     if (__pos > __s.size()) 
@@ -753,7 +753,7 @@ public:
 
   unsigned long to_ulong() const { return _M_do_to_ulong(); }
 
-#if __STL_EXPLICIT_FUNCTION_TMPL_ARGS
+#ifdef __STL_EXPLICIT_FUNCTION_TMPL_ARGS
   template <class _CharT, class _Traits, class _Alloc>
   basic_string<_CharT, _Traits, _Alloc> to_string() const {
     basic_string<_CharT, _Traits, _Alloc> __result;