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
This commit is contained in:
Alexandre Oliva 1998-11-27 12:10:39 +00:00 committed by Alexandre Oliva
parent 3993e0b395
commit 02b19f4191
2 changed files with 8 additions and 2 deletions

View 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

View 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;