Commit 02b19f41 by Alexandre Oliva Committed by Alexandre Oliva

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
parent 3993e0b3
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> 1998-11-01 Mark Mitchell <mark@markmitchell.com>
* stl_alloc.h (default_alloc_template::_S_free_list): Don't * stl_alloc.h (default_alloc_template::_S_free_list): Don't
......
...@@ -626,7 +626,7 @@ public: ...@@ -626,7 +626,7 @@ public:
template<class _CharT, class _Traits, class _Alloc> template<class _CharT, class _Traits, class _Alloc>
explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s, explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s,
size_t __pos = 0, 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() : _Base()
{ {
if (__pos > __s.size()) if (__pos > __s.size())
...@@ -753,7 +753,7 @@ public: ...@@ -753,7 +753,7 @@ public:
unsigned long to_ulong() const { return _M_do_to_ulong(); } 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> template <class _CharT, class _Traits, class _Alloc>
basic_string<_CharT, _Traits, _Alloc> to_string() const { basic_string<_CharT, _Traits, _Alloc> to_string() const {
basic_string<_CharT, _Traits, _Alloc> __result; basic_string<_CharT, _Traits, _Alloc> __result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment