mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-28 06:14:10 +08:00
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:
parent
3993e0b395
commit
02b19f4191
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user