aboutsummaryrefslogtreecommitdiff
path: root/libstdc++
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@dcc.unicamp.br>1998-11-27 12:10:39 +0000
committerAlexandre Oliva <oliva@gcc.gnu.org>1998-11-27 12:10:39 +0000
commit02b19f4191d517d4aae151a1a5ca24cf74747611 (patch)
tree96cd812e0e8be612226b4c7df3082f24375ae89d /libstdc++
parent3993e0b395c3328959780599215c7df62f83715d (diff)
downloadgcc-02b19f4191d517d4aae151a1a5ca24cf74747611.zip
gcc-02b19f4191d517d4aae151a1a5ca24cf74747611.tar.gz
gcc-02b19f4191d517d4aae151a1a5ca24cf74747611.tar.bz2
bitset: explicitly convert basic_string<...>::npos to size_t in default argument to...
* 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 From-SVN: r23937
Diffstat (limited to 'libstdc++')
-rw-r--r--libstdc++/stl/ChangeLog6
-rw-r--r--libstdc++/stl/bitset4
2 files changed, 8 insertions, 2 deletions
diff --git a/libstdc++/stl/ChangeLog b/libstdc++/stl/ChangeLog
index e7ef065..87f26c4 100644
--- a/libstdc++/stl/ChangeLog
+++ b/libstdc++/stl/ChangeLog
@@ -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
diff --git a/libstdc++/stl/bitset b/libstdc++/stl/bitset
index 5660855..64fa595 100644
--- a/libstdc++/stl/bitset
+++ b/libstdc++/stl/bitset
@@ -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;