Commit 46db4159 by Benjamin Kosnik Committed by Benjamin Kosnik

re PR libstdc++/28514 (libstdc++ vs. anonymous namespaces)

2006-10-17  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/28514 
	* include/bits/cpp_type_traits.h (__detail): Uglify namespace.
	* include/ext/rope: Remove global-scope anonymous namespace, use
	nested __detail. Fixup resulting formatting issues.
	* include/ext/ropeimpl.h: Same.
	* include/tr1/hashtable_policy.h: Remove anonymous namespace
	nesting for __detail.
	* include/tr1/random: Revert anonymous namespace to nested
	__detail namespace.
	* include/tr1/random.tcc: Same.
	* src/ext-inst.cc: Fixups for above.

From-SVN: r117824
parent e4fd3c84
2006-10-17 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/28514
* include/bits/cpp_type_traits.h (__detail): Uglify namespace.
* include/ext/rope: Remove global-scope anonymous namespace, use
nested __detail. Fixup resulting formatting issues.
* include/ext/ropeimpl.h: Same.
* include/tr1/hashtable_policy.h: Remove anonymous namespace
nesting for __detail.
* include/tr1/random: Revert anonymous namespace to nested
__detail namespace.
* include/tr1/random.tcc: Same.
* src/ext-inst.cc: Fixups for above.
2006-10-16 Douglas Gregor <doug.gregor@gmail.com> 2006-10-16 Douglas Gregor <doug.gregor@gmail.com>
* include/Makefile.am (tr1_headers): Add new tuple_defs.h. * include/Makefile.am (tr1_headers): Add new tuple_defs.h.
......
...@@ -83,7 +83,7 @@ struct __false_type { }; ...@@ -83,7 +83,7 @@ struct __false_type { };
_GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_BEGIN_NAMESPACE(std)
namespace detail namespace __detail
{ {
// NB: g++ can not compile these if declared within the class // NB: g++ can not compile these if declared within the class
// __is_pod itself. // __is_pod itself.
...@@ -94,7 +94,7 @@ namespace detail ...@@ -94,7 +94,7 @@ namespace detail
__one __test_type(int _Tp::*); __one __test_type(int _Tp::*);
template<typename _Tp> template<typename _Tp>
__two& __test_type(...); __two& __test_type(...);
} // namespace detail } // namespace __detail
template<bool> template<bool>
struct __truth_type struct __truth_type
...@@ -346,8 +346,8 @@ namespace detail ...@@ -346,8 +346,8 @@ namespace detail
{ {
enum enum
{ {
__value = (sizeof(detail::__test_type<_Tp>(0)) __value = (sizeof(__detail::__test_type<_Tp>(0))
!= sizeof(detail::__one)) != sizeof(__detail::__one))
}; };
}; };
......
...@@ -67,13 +67,13 @@ ...@@ -67,13 +67,13 @@
#include <ext/memory> // For uninitialized_copy_n #include <ext/memory> // For uninitialized_copy_n
namespace _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{
namespace __detail
{
enum { _S_max_rope_depth = 45 }; enum { _S_max_rope_depth = 45 };
enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function}; enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function};
} // anonymous namespace } // namespace __detail
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
using std::size_t; using std::size_t;
using std::ptrdiff_t; using std::ptrdiff_t;
...@@ -138,7 +138,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -138,7 +138,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
class char_producer class char_producer
{ {
public: public:
virtual ~char_producer() {}; virtual ~char_producer() { };
virtual void virtual void
operator()(size_t __start_pos, size_t __len, operator()(size_t __start_pos, size_t __len,
...@@ -302,7 +302,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -302,7 +302,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// compile-time would do. Hence this should all be private // compile-time would do. Hence this should all be private
// for now. // for now.
// The symmetry with char_producer is accidental and temporary. // The symmetry with char_producer is accidental and temporary.
virtual ~_Rope_char_consumer() {}; virtual ~_Rope_char_consumer() { };
virtual bool virtual bool
operator()(const _CharT* __buffer, size_t __len) = 0; operator()(const _CharT* __buffer, size_t __len) = 0;
...@@ -535,7 +535,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -535,7 +535,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ return *static_cast<const _Alloc*>(this); } { return *static_cast<const _Alloc*>(this); }
_Rope_rep_base(size_t __size, const allocator_type&) _Rope_rep_base(size_t __size, const allocator_type&)
: _M_size(__size) {} : _M_size(__size) { }
size_t _M_size; size_t _M_size;
...@@ -558,7 +558,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -558,7 +558,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
# endif # endif
{ {
public: public:
_Tag _M_tag:8; __detail::_Tag _M_tag:8;
bool _M_is_balanced:8; bool _M_is_balanced:8;
unsigned char _M_depth; unsigned char _M_depth;
__GC_CONST _CharT* _M_c_string; __GC_CONST _CharT* _M_c_string;
...@@ -574,7 +574,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -574,7 +574,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
using _Rope_rep_base<_CharT, _Alloc>::get_allocator; using _Rope_rep_base<_CharT, _Alloc>::get_allocator;
_Rope_RopeRep(_Tag __t, int __d, bool __b, size_t __size, _Rope_RopeRep(__detail::_Tag __t, int __d, bool __b, size_t __size,
allocator_type __a) allocator_type __a)
: _Rope_rep_base<_CharT, _Alloc>(__size, __a), : _Rope_rep_base<_CharT, _Alloc>(__size, __a),
#ifndef __GC #ifndef __GC
...@@ -592,7 +592,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -592,7 +592,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
#endif #endif
#ifdef __GC #ifdef __GC
void void
_M_incr () {} _M_incr () { }
#endif #endif
static void static void
_S_free_string(__GC_CONST _CharT*, size_t __len, _S_free_string(__GC_CONST _CharT*, size_t __len,
...@@ -640,11 +640,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -640,11 +640,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__t->_M_free_tree(); __t->_M_free_tree();
} }
# else /* __GC */ # else /* __GC */
void _M_unref_nonnil() {} void _M_unref_nonnil() { }
void _M_ref_nonnil() {} void _M_ref_nonnil() { }
static void _S_unref(_Rope_RopeRep*) {} static void _S_unref(_Rope_RopeRep*) { }
static void _S_ref(_Rope_RopeRep*) {} static void _S_ref(_Rope_RopeRep*) { }
static void _S_free_if_unref(_Rope_RopeRep*) {} static void _S_free_if_unref(_Rope_RopeRep*) { }
# endif # endif
protected: protected:
_Rope_RopeRep& _Rope_RopeRep&
...@@ -691,7 +691,7 @@ protected: ...@@ -691,7 +691,7 @@ protected:
_Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size, _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size,
allocator_type __a) allocator_type __a)
: _Rope_RopeRep<_CharT, _Alloc>(_S_leaf, 0, true, : _Rope_RopeRep<_CharT, _Alloc>(__detail::_S_leaf, 0, true,
__size, __a), _M_data(__d) __size, __a), _M_data(__d)
{ {
if (_S_is_basic_char_type((_CharT *)0)) if (_S_is_basic_char_type((_CharT *)0))
...@@ -733,7 +733,7 @@ protected: ...@@ -733,7 +733,7 @@ protected:
_Rope_RopeConcatenation(_Rope_RopeRep<_CharT, _Alloc>* __l, _Rope_RopeConcatenation(_Rope_RopeRep<_CharT, _Alloc>* __l,
_Rope_RopeRep<_CharT, _Alloc>* __r, _Rope_RopeRep<_CharT, _Alloc>* __r,
allocator_type __a) allocator_type __a)
: _Rope_RopeRep<_CharT, _Alloc>(::_S_concat, : _Rope_RopeRep<_CharT, _Alloc>(__detail::_S_concat,
std::max(__l->_M_depth, std::max(__l->_M_depth,
__r->_M_depth) + 1, __r->_M_depth) + 1,
false, false,
...@@ -781,7 +781,7 @@ protected: ...@@ -781,7 +781,7 @@ protected:
_Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size, _Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size,
bool __d, allocator_type __a) bool __d, allocator_type __a)
: _Rope_RopeRep<_CharT, _Alloc>(::_S_function, 0, true, __size, __a) : _Rope_RopeRep<_CharT, _Alloc>(__detail::_S_function, 0, true, __size, __a)
, _M_fn(__f) , _M_fn(__f)
#ifndef __GC #ifndef __GC
, _M_delete_when_done(__d) , _M_delete_when_done(__d)
...@@ -832,15 +832,15 @@ protected: ...@@ -832,15 +832,15 @@ protected:
{ {
switch(_M_base->_M_tag) switch(_M_base->_M_tag)
{ {
case ::_S_function: case __detail::_S_function:
case ::_S_substringfn: case __detail::_S_substringfn:
{ {
char_producer<_CharT>* __fn = char_producer<_CharT>* __fn =
((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn; ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn;
(*__fn)(__start_pos + _M_start, __req_len, __buffer); (*__fn)(__start_pos + _M_start, __req_len, __buffer);
} }
break; break;
case ::_S_leaf: case __detail::_S_leaf:
{ {
__GC_CONST _CharT* __s = __GC_CONST _CharT* __s =
((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data; ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data;
...@@ -864,7 +864,7 @@ protected: ...@@ -864,7 +864,7 @@ protected:
#ifndef __GC #ifndef __GC
_M_base->_M_ref_nonnil(); _M_base->_M_ref_nonnil();
#endif #endif
this->_M_tag = ::_S_substringfn; this->_M_tag = __detail::_S_substringfn;
} }
virtual ~_Rope_RopeSubstring() throw() virtual ~_Rope_RopeSubstring() throw()
{ {
...@@ -893,12 +893,12 @@ protected: ...@@ -893,12 +893,12 @@ protected:
~_Rope_self_destruct_ptr() ~_Rope_self_destruct_ptr()
{ _Rope_RopeRep<_CharT, _Alloc>::_S_unref(_M_ptr); } { _Rope_RopeRep<_CharT, _Alloc>::_S_unref(_M_ptr); }
#ifdef __EXCEPTIONS #ifdef __EXCEPTIONS
_Rope_self_destruct_ptr() : _M_ptr(0) {}; _Rope_self_destruct_ptr() : _M_ptr(0) { };
#else #else
_Rope_self_destruct_ptr() {}; _Rope_self_destruct_ptr() { };
#endif #endif
_Rope_self_destruct_ptr(_Rope_RopeRep<_CharT, _Alloc>* __p) _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT, _Alloc>* __p)
: _M_ptr(__p) {} : _M_ptr(__p) { }
_Rope_RopeRep<_CharT, _Alloc>& _Rope_RopeRep<_CharT, _Alloc>&
operator*() operator*()
...@@ -941,18 +941,18 @@ protected: ...@@ -941,18 +941,18 @@ protected:
_My_rope* _M_root; // The whole rope. _My_rope* _M_root; // The whole rope.
public: public:
_Rope_char_ref_proxy(_My_rope* __r, size_t __p) _Rope_char_ref_proxy(_My_rope* __r, size_t __p)
: _M_pos(__p), _M_current(), _M_current_valid(false), _M_root(__r) {} : _M_pos(__p), _M_current(), _M_current_valid(false), _M_root(__r) { }
_Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x) _Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x)
: _M_pos(__x._M_pos), _M_current(__x._M_current), _M_current_valid(false), : _M_pos(__x._M_pos), _M_current(__x._M_current),
_M_root(__x._M_root) {} _M_current_valid(false), _M_root(__x._M_root) { }
// Don't preserve cache if the reference can outlive the // Don't preserve cache if the reference can outlive the
// expression. We claim that's not possible without calling // expression. We claim that's not possible without calling
// a copy constructor or generating reference to a proxy // a copy constructor or generating reference to a proxy
// reference. We declare the latter to have undefined semantics. // reference. We declare the latter to have undefined semantics.
_Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c) _Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c)
: _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {} : _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) { }
inline operator _CharT () const; inline operator _CharT () const;
...@@ -985,12 +985,12 @@ protected: ...@@ -985,12 +985,12 @@ protected:
rope<_CharT,_Alloc>* _M_root; // The whole rope. rope<_CharT,_Alloc>* _M_root; // The whole rope.
public: public:
_Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x) _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x)
: _M_pos(__x._M_pos), _M_root(__x._M_root) {} : _M_pos(__x._M_pos), _M_root(__x._M_root) { }
_Rope_char_ptr_proxy(const _Rope_char_ptr_proxy& __x) _Rope_char_ptr_proxy(const _Rope_char_ptr_proxy& __x)
: _M_pos(__x._M_pos), _M_root(__x._M_root) {} : _M_pos(__x._M_pos), _M_root(__x._M_root) { }
_Rope_char_ptr_proxy() {} _Rope_char_ptr_proxy() { }
_Rope_char_ptr_proxy(_CharT* __x) _Rope_char_ptr_proxy(_CharT* __x)
: _M_root(0), _M_pos(0) { } : _M_root(0), _M_pos(0) { }
...@@ -1074,10 +1074,10 @@ protected: ...@@ -1074,10 +1074,10 @@ protected:
static void _S_setcache_for_incr(_Rope_iterator_base& __x); static void _S_setcache_for_incr(_Rope_iterator_base& __x);
// As above, but assumes path // As above, but assumes path
// cache is valid for previous posn. // cache is valid for previous posn.
_Rope_iterator_base() {} _Rope_iterator_base() { }
_Rope_iterator_base(_RopeRep* __root, size_t __pos) _Rope_iterator_base(_RopeRep* __root, size_t __pos)
: _M_current_pos(__pos), _M_root(__root), _M_buf_ptr(0) {} : _M_current_pos(__pos), _M_root(__root), _M_buf_ptr(0) { }
void _M_incr(size_t __n); void _M_incr(size_t __n);
void _M_decr(size_t __n); void _M_decr(size_t __n);
...@@ -1114,7 +1114,7 @@ protected: ...@@ -1114,7 +1114,7 @@ protected:
: _Rope_iterator_base<_CharT, _Alloc>(const_cast<_RopeRep*>(__root), : _Rope_iterator_base<_CharT, _Alloc>(const_cast<_RopeRep*>(__root),
__pos) __pos)
// Only nonconst iterators modify root ref count // Only nonconst iterators modify root ref count
{} { }
public: public:
typedef _CharT reference; // Really a value. Returning a reference typedef _CharT reference; // Really a value. Returning a reference
// Would be a mess, since it would have // Would be a mess, since it would have
...@@ -1122,7 +1122,7 @@ protected: ...@@ -1122,7 +1122,7 @@ protected:
typedef const _CharT* pointer; typedef const _CharT* pointer;
public: public:
_Rope_const_iterator() {}; _Rope_const_iterator() { };
_Rope_const_iterator(const _Rope_const_iterator& __x) _Rope_const_iterator(const _Rope_const_iterator& __x)
: _Rope_iterator_base<_CharT,_Alloc>(__x) { } : _Rope_iterator_base<_CharT,_Alloc>(__x) { }
...@@ -1267,13 +1267,13 @@ protected: ...@@ -1267,13 +1267,13 @@ protected:
protected: protected:
typedef typename _Rope_iterator_base<_CharT, _Alloc>::_RopeRep _RopeRep; typedef typename _Rope_iterator_base<_CharT, _Alloc>::_RopeRep _RopeRep;
rope<_CharT, _Alloc>* _M_root_rope; rope<_CharT, _Alloc>* _M_root_rope;
// root is treated as a cached version of this,
// and is used to detect changes to the underlying // root is treated as a cached version of this, and is used to
// rope. // detect changes to the underlying rope.
// Root is included in the reference count.
// This is necessary so that we can detect changes reliably. // Root is included in the reference count. This is necessary
// Unfortunately, it requires careful bookkeeping for the // so that we can detect changes reliably. Unfortunately, it
// nonGC case. // requires careful bookkeeping for the nonGC case.
_Rope_iterator(rope<_CharT, _Alloc>* __r, size_t __pos) _Rope_iterator(rope<_CharT, _Alloc>* __r, size_t __pos)
: _Rope_iterator_base<_CharT, _Alloc>(__r->_M_tree_ptr, __pos), : _Rope_iterator_base<_CharT, _Alloc>(__r->_M_tree_ptr, __pos),
_M_root_rope(__r) _M_root_rope(__r)
...@@ -1287,7 +1287,6 @@ protected: ...@@ -1287,7 +1287,6 @@ protected:
typedef _Rope_char_ref_proxy<_CharT, _Alloc> reference; typedef _Rope_char_ref_proxy<_CharT, _Alloc> reference;
typedef _Rope_char_ref_proxy<_CharT, _Alloc>* pointer; typedef _Rope_char_ref_proxy<_CharT, _Alloc>* pointer;
public:
rope<_CharT, _Alloc>& rope<_CharT, _Alloc>&
container() container()
{ return *_M_root_rope; } { return *_M_root_rope; }
...@@ -1450,9 +1449,9 @@ protected: ...@@ -1450,9 +1449,9 @@ protected:
// The one in _Base may not be visible due to template rules. // The one in _Base may not be visible due to template rules.
_Rope_base(_RopeRep* __t, const allocator_type&) _Rope_base(_RopeRep* __t, const allocator_type&)
: _M_tree_ptr(__t) {} : _M_tree_ptr(__t) { }
_Rope_base(const allocator_type&) {} _Rope_base(const allocator_type&) { }
// The only data member of a rope: // The only data member of a rope:
_RopeRep *_M_tree_ptr; _RopeRep *_M_tree_ptr;
...@@ -1554,8 +1553,8 @@ protected: ...@@ -1554,8 +1553,8 @@ protected:
{ _RopeRep::_S_ref(__t); } { _RopeRep::_S_ref(__t); }
#else /* __GC */ #else /* __GC */
static void _S_unref(_RopeRep*) {} static void _S_unref(_RopeRep*) { }
static void _S_ref(_RopeRep*) {} static void _S_ref(_RopeRep*) { }
#endif #endif
#ifdef __GC #ifdef __GC
...@@ -1711,7 +1710,7 @@ protected: ...@@ -1711,7 +1710,7 @@ protected:
_CharT* __buffer); _CharT* __buffer);
static const unsigned long static const unsigned long
_S_min_len[::_S_max_rope_depth + 1]; _S_min_len[__detail::_S_max_rope_depth + 1];
static bool static bool
_S_is_balanced(_RopeRep* __r) _S_is_balanced(_RopeRep* __r)
...@@ -1818,7 +1817,7 @@ protected: ...@@ -1818,7 +1817,7 @@ protected:
const allocator_type& __a = allocator_type()); const allocator_type& __a = allocator_type());
rope(const allocator_type& __a = allocator_type()) rope(const allocator_type& __a = allocator_type())
: _Base(0, __a) {} : _Base(0, __a) { }
// Construct a rope from a function that can compute its members // Construct a rope from a function that can compute its members
rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn, rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn,
...@@ -1866,8 +1865,7 @@ protected: ...@@ -1866,8 +1865,7 @@ protected:
pop_back() pop_back()
{ {
_RopeRep* __old = this->_M_tree_ptr; _RopeRep* __old = this->_M_tree_ptr;
this->_M_tree_ptr = this->_M_tree_ptr = _S_substring(this->_M_tree_ptr,
_S_substring(this->_M_tree_ptr,
0, this->_M_tree_ptr->_M_size - 1); 0, this->_M_tree_ptr->_M_size - 1);
_S_unref(__old); _S_unref(__old);
} }
...@@ -1961,7 +1959,7 @@ protected: ...@@ -1961,7 +1959,7 @@ protected:
{ {
if (0 == this->_M_tree_ptr) if (0 == this->_M_tree_ptr)
return; return;
if (::_S_leaf == this->_M_tree_ptr->_M_tag && if (__detail::_S_leaf == this->_M_tree_ptr->_M_tag &&
((_RopeLeaf*)this->_M_tree_ptr)->_M_data == ((_RopeLeaf*)this->_M_tree_ptr)->_M_data ==
this->_M_tree_ptr->_M_c_string) this->_M_tree_ptr->_M_c_string)
{ {
...@@ -2013,7 +2011,7 @@ protected: ...@@ -2013,7 +2011,7 @@ protected:
size_type size_type
max_size() const max_size() const
{ {
return _S_min_len[int(::_S_max_rope_depth) - 1] - 1; return _S_min_len[int(__detail::_S_max_rope_depth) - 1] - 1;
// Guarantees that the result can be sufficirntly // Guarantees that the result can be sufficirntly
// balanced. Longer ropes will probably still work, // balanced. Longer ropes will probably still work,
// but it's harder to make guarantees. // but it's harder to make guarantees.
...@@ -2049,12 +2047,13 @@ protected: ...@@ -2049,12 +2047,13 @@ protected:
template<class _CharT2, class _Alloc2> template<class _CharT2, class _Alloc2>
friend rope<_CharT2, _Alloc2> friend rope<_CharT2, _Alloc2>
operator+(const rope<_CharT2, _Alloc2>& __left, _CharT2 __right); operator+(const rope<_CharT2, _Alloc2>& __left, _CharT2 __right);
// The symmetric cases are intentionally omitted, since they're presumed
// to be less common, and we don't handle them as well.
// The following should really be templatized. // The symmetric cases are intentionally omitted, since they're
// The first argument should be an input iterator or // presumed to be less common, and we don't handle them as well.
// forward iterator with value_type _CharT.
// The following should really be templatized. The first
// argument should be an input iterator or forward iterator with
// value_type _CharT.
rope& rope&
append(const _CharT* __iter, size_t __n) append(const _CharT* __iter, size_t __n)
{ {
...@@ -2576,9 +2575,9 @@ protected: ...@@ -2576,9 +2575,9 @@ protected:
return (*this)[__pos]; return (*this)[__pos];
} }
void resize(size_type __n, _CharT __c) {} void resize(size_type __n, _CharT __c) { }
void resize(size_type __n) {} void resize(size_type __n) { }
void reserve(size_type __res_arg = 0) {} void reserve(size_type __res_arg = 0) { }
size_type size_type
capacity() const capacity() const
...@@ -2747,21 +2746,21 @@ protected: ...@@ -2747,21 +2746,21 @@ protected:
__x._M_current_pos + __n); } __x._M_current_pos + __n); }
template <class _CharT, class _Alloc> template <class _CharT, class _Alloc>
inline _Rope_iterator<_CharT,_Alloc> inline _Rope_iterator<_CharT, _Alloc>
operator+(ptrdiff_t __n, const _Rope_iterator<_CharT, _Alloc>& __x) operator+(ptrdiff_t __n, const _Rope_iterator<_CharT, _Alloc>& __x)
{ return _Rope_iterator<_CharT, _Alloc>(__x._M_root_rope, { return _Rope_iterator<_CharT, _Alloc>(__x._M_root_rope,
__x._M_current_pos + __n); } __x._M_current_pos + __n); }
template <class _CharT, class _Alloc> template <class _CharT, class _Alloc>
inline rope<_CharT,_Alloc> inline rope<_CharT, _Alloc>
operator+(const rope<_CharT, _Alloc>& __left, operator+(const rope<_CharT, _Alloc>& __left,
const rope<_CharT, _Alloc>& __right) const rope<_CharT, _Alloc>& __right)
{ {
return rope<_CharT, _Alloc>(rope<_CharT, _Alloc>::
_S_concat(__left._M_tree_ptr,
__right._M_tree_ptr));
// Inlining this should make it possible to keep __left and // Inlining this should make it possible to keep __left and
// __right in registers. // __right in registers.
typedef rope<_CharT, _Alloc> rope_type;
return rope_type(rope_type::_S_concat(__left._M_tree_ptr,
__right._M_tree_ptr));
} }
template <class _CharT, class _Alloc> template <class _CharT, class _Alloc>
...@@ -2778,9 +2777,9 @@ protected: ...@@ -2778,9 +2777,9 @@ protected:
operator+(const rope<_CharT, _Alloc>& __left, operator+(const rope<_CharT, _Alloc>& __left,
const _CharT* __right) const _CharT* __right)
{ {
size_t __rlen = rope<_CharT,_Alloc>::_S_char_ptr_len(__right); typedef rope<_CharT, _Alloc> rope_type;
return rope<_CharT, _Alloc>(rope<_CharT, _Alloc>:: size_t __rlen = rope_type::_S_char_ptr_len(__right);
_S_concat_char_iter(__left._M_tree_ptr, return rope_type(rope_type::_S_concat_char_iter(__left._M_tree_ptr,
__right, __rlen)); __right, __rlen));
} }
...@@ -2797,8 +2796,8 @@ protected: ...@@ -2797,8 +2796,8 @@ protected:
inline rope<_CharT, _Alloc> inline rope<_CharT, _Alloc>
operator+(const rope<_CharT, _Alloc>& __left, _CharT __right) operator+(const rope<_CharT, _Alloc>& __left, _CharT __right)
{ {
return rope<_CharT, _Alloc>(rope<_CharT, _Alloc>:: typedef rope<_CharT, _Alloc> rope_type;
_S_concat_char_iter(__left._M_tree_ptr, return rope_type(rope_type::_S_concat_char_iter(__left._M_tree_ptr,
&__right, 1)); &__right, 1));
} }
...@@ -2887,7 +2886,6 @@ protected: ...@@ -2887,7 +2886,6 @@ protected:
operator()(const crope& __str) const operator()(const crope& __str) const
{ {
size_t __size = __str.size(); size_t __size = __str.size();
if (0 == __size) if (0 == __size)
return 0; return 0;
return 13 * __str[0] + 5 * __str[__size - 1] + __size; return 13 * __str[0] + 5 * __str[__size - 1] + __size;
...@@ -2902,7 +2900,6 @@ protected: ...@@ -2902,7 +2900,6 @@ protected:
operator()(const wrope& __str) const operator()(const wrope& __str) const
{ {
size_t __size = __str.size(); size_t __size = __str.size();
if (0 == __size) if (0 == __size)
return 0; return 0;
return 13 * __str[0] + 5 * __str[__size - 1] + __size; return 13 * __str[0] + 5 * __str[__size - 1] + __size;
......
...@@ -78,13 +78,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -78,13 +78,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
switch(__leaf->_M_tag) switch(__leaf->_M_tag)
{ {
case ::_S_leaf: case __detail::_S_leaf:
__x._M_buf_start = ((_Rope_RopeLeaf<_CharT, _Alloc>*)__leaf)->_M_data; __x._M_buf_start = ((_Rope_RopeLeaf<_CharT, _Alloc>*)__leaf)->_M_data;
__x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos); __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos);
__x._M_buf_end = __x._M_buf_start + __leaf->_M_size; __x._M_buf_end = __x._M_buf_start + __leaf->_M_size;
break; break;
case ::_S_function: case __detail::_S_function:
case ::_S_substringfn: case __detail::_S_substringfn:
{ {
size_t __len = _S_iterator_buf_len; size_t __len = _S_iterator_buf_len;
size_t __buf_start_pos = __leaf_pos; size_t __buf_start_pos = __leaf_pos;
...@@ -117,7 +117,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -117,7 +117,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_Rope_iterator_base<_CharT, _Alloc>:: _Rope_iterator_base<_CharT, _Alloc>::
_S_setcache(_Rope_iterator_base<_CharT, _Alloc>& __x) _S_setcache(_Rope_iterator_base<_CharT, _Alloc>& __x)
{ {
const _RopeRep* __path[int(::_S_max_rope_depth) + 1]; const _RopeRep* __path[int(__detail::_S_max_rope_depth) + 1];
const _RopeRep* __curr_rope; const _RopeRep* __curr_rope;
int __curr_depth = -1; /* index into path */ int __curr_depth = -1; /* index into path */
size_t __curr_start_pos = 0; size_t __curr_start_pos = 0;
...@@ -147,12 +147,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -147,12 +147,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__path[__curr_depth] = __curr_rope; __path[__curr_depth] = __curr_rope;
switch(__curr_rope->_M_tag) switch(__curr_rope->_M_tag)
{ {
case ::_S_leaf: case __detail::_S_leaf:
case ::_S_function: case __detail::_S_function:
case ::_S_substringfn: case __detail::_S_substringfn:
__x._M_leaf_pos = __curr_start_pos; __x._M_leaf_pos = __curr_start_pos;
goto done; goto done;
case ::_S_concat: case __detail::_S_concat:
{ {
_Rope_RopeConcatenation<_CharT, _Alloc>* __c = _Rope_RopeConcatenation<_CharT, _Alloc>* __c =
(_Rope_RopeConcatenation<_CharT, _Alloc>*)__curr_rope; (_Rope_RopeConcatenation<_CharT, _Alloc>*)__curr_rope;
...@@ -234,7 +234,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -234,7 +234,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__current_node = __c->_M_right; __current_node = __c->_M_right;
__x._M_path_end[++__current_index] = __current_node; __x._M_path_end[++__current_index] = __current_node;
__dirns |= 1; __dirns |= 1;
while (::_S_concat == __current_node->_M_tag) while (__detail::_S_concat == __current_node->_M_tag)
{ {
++__current_index; ++__current_index;
if (int(_S_path_cache_len) == __current_index) if (int(_S_path_cache_len) == __current_index)
...@@ -378,7 +378,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -378,7 +378,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ {
switch(_M_tag) switch(_M_tag)
{ {
case ::_S_leaf: case __detail::_S_leaf:
{ {
_Rope_RopeLeaf<_CharT, _Alloc>* __l _Rope_RopeLeaf<_CharT, _Alloc>* __l
= (_Rope_RopeLeaf<_CharT, _Alloc>*)this; = (_Rope_RopeLeaf<_CharT, _Alloc>*)this;
...@@ -386,7 +386,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -386,7 +386,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_L_deallocate(__l, 1); _L_deallocate(__l, 1);
break; break;
} }
case ::_S_concat: case __detail::_S_concat:
{ {
_Rope_RopeConcatenation<_CharT,_Alloc>* __c _Rope_RopeConcatenation<_CharT,_Alloc>* __c
= (_Rope_RopeConcatenation<_CharT, _Alloc>*)this; = (_Rope_RopeConcatenation<_CharT, _Alloc>*)this;
...@@ -395,7 +395,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -395,7 +395,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_C_deallocate(__c, 1); _C_deallocate(__c, 1);
break; break;
} }
case ::_S_function: case __detail::_S_function:
{ {
_Rope_RopeFunction<_CharT, _Alloc>* __f _Rope_RopeFunction<_CharT, _Alloc>* __f
= (_Rope_RopeFunction<_CharT, _Alloc>*)this; = (_Rope_RopeFunction<_CharT, _Alloc>*)this;
...@@ -403,7 +403,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -403,7 +403,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_F_deallocate(__f, 1); _F_deallocate(__f, 1);
break; break;
} }
case ::_S_substringfn: case __detail::_S_substringfn:
{ {
_Rope_RopeSubstring<_CharT, _Alloc>* __ss = _Rope_RopeSubstring<_CharT, _Alloc>* __ss =
(_Rope_RopeSubstring<_CharT, _Alloc>*)this; (_Rope_RopeSubstring<_CharT, _Alloc>*)this;
...@@ -503,7 +503,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -503,7 +503,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
if (__depth > 20 if (__depth > 20
&& (__result->_M_size < 1000 && (__result->_M_size < 1000
|| __depth > size_t(::_S_max_rope_depth))) || __depth > size_t(__detail::_S_max_rope_depth)))
{ {
_RopeRep* __balanced; _RopeRep* __balanced;
...@@ -541,14 +541,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -541,14 +541,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
if (0 == __r) if (0 == __r)
return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen,
__r->get_allocator()); __r->get_allocator());
if (__r->_M_tag == ::_S_leaf if (__r->_M_tag == __detail::_S_leaf
&& __r->_M_size + __slen <= size_t(_S_copy_max)) && __r->_M_size + __slen <= size_t(_S_copy_max))
{ {
__result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
return __result; return __result;
} }
if (::_S_concat == __r->_M_tag if (__detail::_S_concat == __r->_M_tag
&& ::_S_leaf == ((_RopeConcatenation*) __r)->_M_right->_M_tag) && __detail::_S_leaf == ((_RopeConcatenation*) __r)->_M_right->_M_tag)
{ {
_RopeLeaf* __right = _RopeLeaf* __right =
(_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right); (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right);
...@@ -605,17 +605,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -605,17 +605,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return __r; return __r;
} }
if (__orig_size + __slen <= size_t(_S_copy_max) if (__orig_size + __slen <= size_t(_S_copy_max)
&& ::_S_leaf == __r->_M_tag) && __detail::_S_leaf == __r->_M_tag)
{ {
__result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s,
__slen); __slen);
return __result; return __result;
} }
if (::_S_concat == __r->_M_tag) if (__detail::_S_concat == __r->_M_tag)
{ {
_RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*) _RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)
__r)->_M_right); __r)->_M_right);
if (::_S_leaf == __right->_M_tag if (__detail::_S_leaf == __right->_M_tag
&& __right->_M_size + __slen <= size_t(_S_copy_max)) && __right->_M_size + __slen <= size_t(_S_copy_max))
{ {
_RopeRep* __new_right = _RopeRep* __new_right =
...@@ -665,17 +665,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -665,17 +665,17 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__left->_M_ref_nonnil(); __left->_M_ref_nonnil();
return __left; return __left;
} }
if (::_S_leaf == __right->_M_tag) if (__detail::_S_leaf == __right->_M_tag)
{ {
if (::_S_leaf == __left->_M_tag) if (__detail::_S_leaf == __left->_M_tag)
{ {
if (__right->_M_size + __left->_M_size <= size_t(_S_copy_max)) if (__right->_M_size + __left->_M_size <= size_t(_S_copy_max))
return _S_leaf_concat_char_iter((_RopeLeaf*)__left, return _S_leaf_concat_char_iter((_RopeLeaf*)__left,
((_RopeLeaf*)__right)->_M_data, ((_RopeLeaf*)__right)->_M_data,
__right->_M_size); __right->_M_size);
} }
else if (::_S_concat == __left->_M_tag else if (__detail::_S_concat == __left->_M_tag
&& ::_S_leaf == ((_RopeConcatenation*) && __detail::_S_leaf == ((_RopeConcatenation*)
__left)->_M_right->_M_tag) __left)->_M_right->_M_tag)
{ {
_RopeLeaf* __leftright = _RopeLeaf* __leftright =
...@@ -740,7 +740,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -740,7 +740,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
switch(__base->_M_tag) switch(__base->_M_tag)
{ {
case ::_S_concat: case __detail::_S_concat:
{ {
_RopeConcatenation* __c = (_RopeConcatenation*)__base; _RopeConcatenation* __c = (_RopeConcatenation*)__base;
_RopeRep* __left = __c->_M_left; _RopeRep* __left = __c->_M_left;
...@@ -762,7 +762,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -762,7 +762,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__result = _S_concat(__left_result, __right_result); __result = _S_concat(__left_result, __right_result);
return __result; return __result;
} }
case ::_S_leaf: case __detail::_S_leaf:
{ {
_RopeLeaf* __l = (_RopeLeaf*)__base; _RopeLeaf* __l = (_RopeLeaf*)__base;
_RopeLeaf* __result; _RopeLeaf* __result;
...@@ -786,7 +786,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -786,7 +786,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
#endif #endif
return __result; return __result;
} }
case ::_S_substringfn: case __detail::_S_substringfn:
// Avoid introducing multiple layers of substring nodes. // Avoid introducing multiple layers of substring nodes.
{ {
_RopeSubstring* __old = (_RopeSubstring*)__base; _RopeSubstring* __old = (_RopeSubstring*)__base;
...@@ -805,7 +805,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -805,7 +805,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
} // *** else fall through: *** } // *** else fall through: ***
} }
case ::_S_function: case __detail::_S_function:
{ {
_RopeFunction* __f = (_RopeFunction*)__base; _RopeFunction* __f = (_RopeFunction*)__base;
_CharT* __section; _CharT* __section;
...@@ -930,7 +930,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -930,7 +930,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return true; return true;
switch(__r->_M_tag) switch(__r->_M_tag)
{ {
case ::_S_concat: case __detail::_S_concat:
{ {
_RopeConcatenation* __conc = (_RopeConcatenation*)__r; _RopeConcatenation* __conc = (_RopeConcatenation*)__r;
_RopeRep* __left = __conc->_M_left; _RopeRep* __left = __conc->_M_left;
...@@ -952,13 +952,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -952,13 +952,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
} }
} }
return true; return true;
case ::_S_leaf: case __detail::_S_leaf:
{ {
_RopeLeaf* __l = (_RopeLeaf*)__r; _RopeLeaf* __l = (_RopeLeaf*)__r;
return __c(__l->_M_data + __begin, __end - __begin); return __c(__l->_M_data + __begin, __end - __begin);
} }
case ::_S_function: case __detail::_S_function:
case ::_S_substringfn: case __detail::_S_substringfn:
{ {
_RopeFunction* __f = (_RopeFunction*)__r; _RopeFunction* __f = (_RopeFunction*)__r;
size_t __len = __end - __begin; size_t __len = __end - __begin;
...@@ -1081,7 +1081,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1081,7 +1081,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return __buffer; return __buffer;
switch(__r->_M_tag) switch(__r->_M_tag)
{ {
case ::_S_concat: case __detail::_S_concat:
{ {
_RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeConcatenation* __c = (_RopeConcatenation*)__r;
_RopeRep* __left = __c->_M_left; _RopeRep* __left = __c->_M_left;
...@@ -1089,13 +1089,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1089,13 +1089,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
_CharT* __rest = _S_flatten(__left, __buffer); _CharT* __rest = _S_flatten(__left, __buffer);
return _S_flatten(__right, __rest); return _S_flatten(__right, __rest);
} }
case ::_S_leaf: case __detail::_S_leaf:
{ {
_RopeLeaf* __l = (_RopeLeaf*)__r; _RopeLeaf* __l = (_RopeLeaf*)__r;
return copy_n(__l->_M_data, __l->_M_size, __buffer).second; return copy_n(__l->_M_data, __l->_M_size, __buffer).second;
} }
case ::_S_function: case __detail::_S_function:
case ::_S_substringfn: case __detail::_S_substringfn:
// We don't yet do anything with substring nodes. // We don't yet do anything with substring nodes.
// This needs to be fixed before ropefiles will work well. // This needs to be fixed before ropefiles will work well.
{ {
...@@ -1147,13 +1147,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1147,13 +1147,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
switch (__r->_M_tag) switch (__r->_M_tag)
{ {
case ::_S_leaf: case __detail::_S_leaf:
__kind = "Leaf"; __kind = "Leaf";
break; break;
case ::_S_function: case __detail::_S_function:
__kind = "Function"; __kind = "Function";
break; break;
case ::_S_substringfn: case __detail::_S_substringfn:
__kind = "Function representing substring"; __kind = "Function representing substring";
break; break;
default: default:
...@@ -1186,7 +1186,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1186,7 +1186,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
template <class _CharT, class _Alloc> template <class _CharT, class _Alloc>
const unsigned long const unsigned long
rope<_CharT, _Alloc>:: rope<_CharT, _Alloc>::
_S_min_len[int(::_S_max_rope_depth) + 1] = { _S_min_len[int(__detail::_S_max_rope_depth) + 1] = {
/* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21, /* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21,
/* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377, /* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377,
/* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181, /* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181,
...@@ -1205,7 +1205,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1205,7 +1205,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
rope<_CharT, _Alloc>:: rope<_CharT, _Alloc>::
_S_balance(_RopeRep* __r) _S_balance(_RopeRep* __r)
{ {
_RopeRep* __forest[int(::_S_max_rope_depth) + 1]; _RopeRep* __forest[int(__detail::_S_max_rope_depth) + 1];
_RopeRep* __result = 0; _RopeRep* __result = 0;
int __i; int __i;
// Invariant: // Invariant:
...@@ -1214,12 +1214,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1214,12 +1214,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// __forest[__i]._M_depth = __i // __forest[__i]._M_depth = __i
// References from forest are included in refcount. // References from forest are included in refcount.
for (__i = 0; __i <= int(::_S_max_rope_depth); ++__i) for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
__forest[__i] = 0; __forest[__i] = 0;
try try
{ {
_S_add_to_forest(__r, __forest); _S_add_to_forest(__r, __forest);
for (__i = 0; __i <= int(::_S_max_rope_depth); ++__i) for (__i = 0; __i <= int(__detail::_S_max_rope_depth); ++__i)
if (0 != __forest[__i]) if (0 != __forest[__i])
{ {
#ifndef __GC #ifndef __GC
...@@ -1234,12 +1234,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1234,12 +1234,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
} }
catch(...) catch(...)
{ {
for(__i = 0; __i <= int(::_S_max_rope_depth); __i++) for(__i = 0; __i <= int(__detail::_S_max_rope_depth); __i++)
_S_unref(__forest[__i]); _S_unref(__forest[__i]);
__throw_exception_again; __throw_exception_again;
} }
if (__result->_M_depth > int(::_S_max_rope_depth)) if (__result->_M_depth > int(__detail::_S_max_rope_depth))
__throw_length_error(__N("rope::_S_balance")); __throw_length_error(__N("rope::_S_balance"));
return(__result); return(__result);
} }
...@@ -1307,7 +1307,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1307,7 +1307,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__forest[__i]->_M_unref_nonnil(); __forest[__i]->_M_unref_nonnil();
__forest[__i] = 0; __forest[__i] = 0;
} }
if (__i == int(::_S_max_rope_depth) if (__i == int(__detail::_S_max_rope_depth)
|| __insertee->_M_size < _S_min_len[__i+1]) || __insertee->_M_size < _S_min_len[__i+1])
{ {
__forest[__i] = __insertee; __forest[__i] = __insertee;
...@@ -1330,7 +1330,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1330,7 +1330,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ {
switch(__r->_M_tag) switch(__r->_M_tag)
{ {
case ::_S_concat: case __detail::_S_concat:
{ {
_RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeConcatenation* __c = (_RopeConcatenation*)__r;
_RopeRep* __left = __c->_M_left; _RopeRep* __left = __c->_M_left;
...@@ -1345,13 +1345,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1345,13 +1345,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__r = __left; __r = __left;
} }
break; break;
case ::_S_leaf: case __detail::_S_leaf:
{ {
_RopeLeaf* __l = (_RopeLeaf*)__r; _RopeLeaf* __l = (_RopeLeaf*)__r;
return __l->_M_data[__i]; return __l->_M_data[__i];
} }
case ::_S_function: case __detail::_S_function:
case ::_S_substringfn: case __detail::_S_substringfn:
{ {
_RopeFunction* __f = (_RopeFunction*)__r; _RopeFunction* __f = (_RopeFunction*)__r;
_CharT __result; _CharT __result;
...@@ -1371,7 +1371,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1371,7 +1371,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
rope<_CharT, _Alloc>:: rope<_CharT, _Alloc>::
_S_fetch_ptr(_RopeRep* __r, size_type __i) _S_fetch_ptr(_RopeRep* __r, size_type __i)
{ {
_RopeRep* __clrstack[::_S_max_rope_depth]; _RopeRep* __clrstack[__detail::_S_max_rope_depth];
size_t __csptr = 0; size_t __csptr = 0;
for(;;) for(;;)
...@@ -1380,7 +1380,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1380,7 +1380,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return 0; return 0;
switch(__r->_M_tag) switch(__r->_M_tag)
{ {
case ::_S_concat: case __detail::_S_concat:
{ {
_RopeConcatenation* __c = (_RopeConcatenation*)__r; _RopeConcatenation* __c = (_RopeConcatenation*)__r;
_RopeRep* __left = __c->_M_left; _RopeRep* __left = __c->_M_left;
...@@ -1397,7 +1397,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1397,7 +1397,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
__r = __left; __r = __left;
} }
break; break;
case ::_S_leaf: case __detail::_S_leaf:
{ {
_RopeLeaf* __l = (_RopeLeaf*)__r; _RopeLeaf* __l = (_RopeLeaf*)__r;
if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0) if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0)
...@@ -1411,8 +1411,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1411,8 +1411,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
} }
return __l->_M_data + __i; return __l->_M_data + __i;
} }
case ::_S_function: case __detail::_S_function:
case ::_S_substringfn: case __detail::_S_substringfn:
return 0; return 0;
} }
} }
...@@ -1437,10 +1437,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1437,10 +1437,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return -1; return -1;
__left_len = __left->_M_size; __left_len = __left->_M_size;
__right_len = __right->_M_size; __right_len = __right->_M_size;
if (::_S_leaf == __left->_M_tag) if (__detail::_S_leaf == __left->_M_tag)
{ {
_RopeLeaf* __l = (_RopeLeaf*) __left; _RopeLeaf* __l = (_RopeLeaf*) __left;
if (::_S_leaf == __right->_M_tag) if (__detail::_S_leaf == __right->_M_tag)
{ {
_RopeLeaf* __r = (_RopeLeaf*) __right; _RopeLeaf* __r = (_RopeLeaf*) __right;
return lexicographical_compare_3way(__l->_M_data, return lexicographical_compare_3way(__l->_M_data,
...@@ -1461,7 +1461,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1461,7 +1461,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
{ {
const_iterator __lstart(__left, 0); const_iterator __lstart(__left, 0);
const_iterator __lend(__left, __left_len); const_iterator __lend(__left, __left_len);
if (::_S_leaf == __right->_M_tag) if (__detail::_S_leaf == __right->_M_tag)
{ {
_RopeLeaf* __r = (_RopeLeaf*) __right; _RopeLeaf* __r = (_RopeLeaf*) __right;
return lexicographical_compare_3way(__lstart, __lend, return lexicographical_compare_3way(__lstart, __lend,
...@@ -1637,7 +1637,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -1637,7 +1637,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
return _S_empty_c_str; return _S_empty_c_str;
} }
__GC_CONST _CharT* __old_c_string = this->_M_tree_ptr->_M_c_string; __GC_CONST _CharT* __old_c_string = this->_M_tree_ptr->_M_c_string;
if (::_S_leaf == this->_M_tree_ptr->_M_tag if (__detail::_S_leaf == this->_M_tree_ptr->_M_tag
&& 0 != __old_c_string) && 0 != __old_c_string)
return(__old_c_string); return(__old_c_string);
size_t __s = size(); size_t __s = size();
......
...@@ -43,8 +43,6 @@ namespace std ...@@ -43,8 +43,6 @@ namespace std
_GLIBCXX_BEGIN_NAMESPACE(tr1) _GLIBCXX_BEGIN_NAMESPACE(tr1)
namespace __detail namespace __detail
{ {
namespace
{
// Helper function: return distance(first, last) for forward // Helper function: return distance(first, last) for forward
// iterators, or 0 for input iterators. // iterators, or 0 for input iterators.
template<class _Iterator> template<class _Iterator>
...@@ -168,7 +166,6 @@ namespace ...@@ -168,7 +166,6 @@ namespace
(unsigned long)18446744073709551557ull, (unsigned long)18446744073709551557ull,
(unsigned long)18446744073709551557ull (unsigned long)18446744073709551557ull
}; };
} // anonymous namespace
// Auxiliary types used for all instantiations of _Hashtable: nodes // Auxiliary types used for all instantiations of _Hashtable: nodes
// and iterators. // and iterators.
......
...@@ -62,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -62,7 +62,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
/* /*
* Implementation-space details. * Implementation-space details.
*/ */
namespace namespace __detail
{ {
template<typename _UIntType, int __w, template<typename _UIntType, int __w,
bool = __w < std::numeric_limits<_UIntType>::digits> bool = __w < std::numeric_limits<_UIntType>::digits>
...@@ -85,7 +85,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -85,7 +85,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
typedef __gnu_cxx::__conditional_type<(sizeof(unsigned) == 4), typedef __gnu_cxx::__conditional_type<(sizeof(unsigned) == 4),
unsigned, unsigned long>::__type _UInt32Type; unsigned, unsigned long>::__type _UInt32Type;
} // anonymous namespace
/* /*
* An adaptor class for converting the output of any Generator into * An adaptor class for converting the output of any Generator into
...@@ -158,7 +157,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -158,7 +157,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
/ result_type(_M_g.max() - _M_g.min()); / result_type(_M_g.max() - _M_g.min());
return __return_value; return __return_value;
} }
} // namespace __detail
/** /**
* Produces random numbers on a given disribution function using a un uniform * Produces random numbers on a given disribution function using a un uniform
...@@ -176,7 +175,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -176,7 +175,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
public: public:
typedef _Engine engine_type; typedef _Engine engine_type;
typedef _Adaptor<_Engine, _Dist> engine_value_type; typedef __detail::_Adaptor<_Engine, _Dist> engine_value_type;
typedef _Dist distribution_type; typedef _Dist distribution_type;
typedef typename _Dist::result_type result_type; typedef typename _Dist::result_type result_type;
...@@ -184,7 +183,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -184,7 +183,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
typedef typename __gnu_cxx::__enable_if< typedef typename __gnu_cxx::__enable_if<
is_arithmetic<result_type>::value, result_type>::__type _IsValidType; is_arithmetic<result_type>::value, result_type>::__type _IsValidType;
public:
/** /**
* Constructs a variate generator with the uniform random number * Constructs a variate generator with the uniform random number
* generator @p __eng for the random distribution @p __dist. * generator @p __eng for the random distribution @p __dist.
...@@ -360,7 +358,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -360,7 +358,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
*/ */
result_type result_type
min() const min() const
{ return (__mod<_UIntType, 1, 0, __m>(__c) == 0) ? 1 : 0; } { return (__detail::__mod<_UIntType, 1, 0, __m>(__c) == 0) ? 1 : 0; }
/** /**
* Gets the largest possible value in the output range. * Gets the largest possible value in the output range.
...@@ -448,7 +446,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -448,7 +446,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
void void
seed(_Gen& __g, false_type); seed(_Gen& __g, false_type);
private:
_UIntType _M_x; _UIntType _M_x;
}; };
...@@ -542,7 +539,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -542,7 +539,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
result_type result_type
max() const max() const
{ return _Shift<_UIntType, __w>::__value - 1; } { return __detail::_Shift<_UIntType, __w>::__value - 1; }
result_type result_type
operator()(); operator()();
...@@ -625,7 +622,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -625,7 +622,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
void void
seed(_Gen& __g, false_type); seed(_Gen& __g, false_type);
private:
_UIntType _M_x[state_size]; _UIntType _M_x[state_size];
int _M_p; int _M_p;
}; };
...@@ -682,7 +678,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -682,7 +678,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
static const int long_lag = __r; static const int long_lag = __r;
static const int short_lag = __s; static const int short_lag = __s;
public:
/** /**
* Constructs a default-initialized % subtract_with_carry random number * Constructs a default-initialized % subtract_with_carry random number
* generator. * generator.
...@@ -826,7 +821,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -826,7 +821,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
void void
seed(_Gen& __g, false_type); seed(_Gen& __g, false_type);
private:
typedef typename __gnu_cxx::__add_unsigned<_IntType>::__type _UIntType; typedef typename __gnu_cxx::__add_unsigned<_IntType>::__type _UIntType;
_UIntType _M_x[long_lag]; _UIntType _M_x[long_lag];
...@@ -857,7 +851,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -857,7 +851,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
static const int long_lag = __r; static const int long_lag = __r;
static const int short_lag = __s; static const int short_lag = __s;
public:
/** /**
* Constructs a default-initialized % subtract_with_carry_01 random * Constructs a default-initialized % subtract_with_carry_01 random
* number generator. * number generator.
...@@ -1011,12 +1004,12 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -1011,12 +1004,12 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
void void
seed(_Gen& __g, false_type); seed(_Gen& __g, false_type);
private:
void void
_M_initialize_npows(); _M_initialize_npows();
static const int __n = (__w + 31) / 32; static const int __n = (__w + 31) / 32;
typedef __detail::_UInt32Type _UInt32Type;
_UInt32Type _M_x[long_lag][__n]; _UInt32Type _M_x[long_lag][__n];
_RealType _M_npows[__n]; _RealType _M_npows[__n];
_UInt32Type _M_carry; _UInt32Type _M_carry;
......
...@@ -34,7 +34,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -34,7 +34,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
/* /*
* (Further) implementation-space details. * (Further) implementation-space details.
*/ */
namespace namespace __detail
{ {
// General case for x = (ax + c) mod m -- use Schrage's algorithm to avoid // General case for x = (ax + c) mod m -- use Schrage's algorithm to avoid
// integer overflow. // integer overflow.
...@@ -86,8 +86,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -86,8 +86,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
__calc(_Tp __x) __calc(_Tp __x)
{ return __a * __x + __c; } { return __a * __x + __c; }
}; };
} // anonymous namespace } // namespace __detail
/** /**
* Seeds the LCR with integral value @p __x0, adjusted so that the * Seeds the LCR with integral value @p __x0, adjusted so that the
...@@ -98,11 +97,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -98,11 +97,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
linear_congruential<_UIntType, __a, __c, __m>:: linear_congruential<_UIntType, __a, __c, __m>::
seed(unsigned long __x0) seed(unsigned long __x0)
{ {
if ((__mod<_UIntType, 1, 0, __m>(__c) == 0) if ((__detail::__mod<_UIntType, 1, 0, __m>(__c) == 0)
&& (__mod<_UIntType, 1, 0, __m>(__x0) == 0)) && (__detail::__mod<_UIntType, 1, 0, __m>(__x0) == 0))
_M_x = __mod<_UIntType, 1, 0, __m>(1); _M_x = __detail::__mod<_UIntType, 1, 0, __m>(1);
else else
_M_x = __mod<_UIntType, 1, 0, __m>(__x0); _M_x = __detail::__mod<_UIntType, 1, 0, __m>(__x0);
} }
/** /**
...@@ -115,11 +114,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -115,11 +114,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
seed(_Gen& __g, false_type) seed(_Gen& __g, false_type)
{ {
_UIntType __x0 = __g(); _UIntType __x0 = __g();
if ((__mod<_UIntType, 1, 0, __m>(__c) == 0) if ((__detail::__mod<_UIntType, 1, 0, __m>(__c) == 0)
&& (__mod<_UIntType, 1, 0, __m>(__x0) == 0)) && (__detail::__mod<_UIntType, 1, 0, __m>(__x0) == 0))
_M_x = __mod<_UIntType, 1, 0, __m>(1); _M_x = __detail::__mod<_UIntType, 1, 0, __m>(1);
else else
_M_x = __mod<_UIntType, 1, 0, __m>(__x0); _M_x = __detail::__mod<_UIntType, 1, 0, __m>(__x0);
} }
/** /**
...@@ -130,7 +129,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -130,7 +129,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
linear_congruential<_UIntType, __a, __c, __m>:: linear_congruential<_UIntType, __a, __c, __m>::
operator()() operator()()
{ {
_M_x = __mod<_UIntType, __a, __c, __m>(_M_x); _M_x = __detail::__mod<_UIntType, __a, __c, __m>(_M_x);
return _M_x; return _M_x;
} }
...@@ -177,8 +176,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -177,8 +176,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
__b, __t, __c, __l>:: __b, __t, __c, __l>::
seed(unsigned long __value) seed(unsigned long __value)
{ {
_M_x[0] = __mod<_UIntType, 1, 0, _M_x[0] = __detail::__mod<_UIntType, 1, 0,
_Shift<_UIntType, __w>::__value>(__value); __detail::_Shift<_UIntType, __w>::__value>(__value);
for (int __i = 1; __i < state_size; ++__i) for (int __i = 1; __i < state_size; ++__i)
{ {
...@@ -186,8 +185,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -186,8 +185,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
__x ^= __x >> (__w - 2); __x ^= __x >> (__w - 2);
__x *= 1812433253ul; __x *= 1812433253ul;
__x += __i; __x += __i;
_M_x[__i] = __mod<_UIntType, 1, 0, _M_x[__i] = __detail::__mod<_UIntType, 1, 0,
_Shift<_UIntType, __w>::__value>(__x); __detail::_Shift<_UIntType, __w>::__value>(__x);
} }
_M_p = state_size; _M_p = state_size;
} }
...@@ -202,8 +201,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -202,8 +201,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
seed(_Gen& __gen, false_type) seed(_Gen& __gen, false_type)
{ {
for (int __i = 0; __i < state_size; ++__i) for (int __i = 0; __i < state_size; ++__i)
_M_x[__i] = __mod<_UIntType, 1, 0, _M_x[__i] = __detail::__mod<_UIntType, 1, 0,
_Shift<_UIntType, __w>::__value>(__gen()); __detail::_Shift<_UIntType, __w>::__value>(__gen());
_M_p = state_size; _M_p = state_size;
} }
...@@ -313,7 +312,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -313,7 +312,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
__lcg(__value); __lcg(__value);
for (int __i = 0; __i < long_lag; ++__i) for (int __i = 0; __i < long_lag; ++__i)
_M_x[__i] = __mod<_UIntType, 1, 0, modulus>(__lcg()); _M_x[__i] = __detail::__mod<_UIntType, 1, 0, modulus>(__lcg());
_M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0; _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
_M_p = 0; _M_p = 0;
...@@ -333,10 +332,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -333,10 +332,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
_UIntType __factor = 1; _UIntType __factor = 1;
for (int __j = 0; __j < __n; ++__j) for (int __j = 0; __j < __n; ++__j)
{ {
__tmp += __mod<_UInt32Type, 1, 0, 0>(__gen()) * __factor; __tmp += __detail::__mod<__detail::_UInt32Type, 1, 0, 0>(__gen()) * __factor;
__factor *= _Shift<_UIntType, 32>::__value; __factor *= __detail::_Shift<_UIntType, 32>::__value;
} }
_M_x[__i] = __mod<_UIntType, 1, 0, modulus>(__tmp); _M_x[__i] = __detail::__mod<_UIntType, 1, 0, modulus>(__tmp);
} }
_M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0; _M_carry = (_M_x[long_lag - 1] == 0) ? 1 : 0;
_M_p = 0; _M_p = 0;
...@@ -453,9 +452,9 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -453,9 +452,9 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
for (int __i = 0; __i < long_lag; ++__i) for (int __i = 0; __i < long_lag; ++__i)
{ {
for (int __j = 0; __j < __n - 1; ++__j) for (int __j = 0; __j < __n - 1; ++__j)
_M_x[__i][__j] = __mod<_UInt32Type, 1, 0, 0>(__gen()); _M_x[__i][__j] = __detail::__mod<_UInt32Type, 1, 0, 0>(__gen());
_M_x[__i][__n - 1] = __mod<_UInt32Type, 1, 0, _M_x[__i][__n - 1] = __detail::__mod<_UInt32Type, 1, 0,
_Shift<_UInt32Type, __w % 32>::__value>(__gen()); __detail::_Shift<_UInt32Type, __w % 32>::__value>(__gen());
} }
_M_carry = 1; _M_carry = 1;
...@@ -498,8 +497,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -498,8 +497,8 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
else else
__new_carry = 1; __new_carry = 1;
_M_x[_M_p][__n - 1] = __mod<_UInt32Type, 1, 0, _M_x[_M_p][__n - 1] = __detail::__mod<_UInt32Type, 1, 0,
_Shift<_UInt32Type, __w % 32>::__value> __detail::_Shift<_UInt32Type, __w % 32>::__value>
(_M_x[__ps][__n - 1] - _M_x[_M_p][__n - 1] - _M_carry); (_M_x[__ps][__n - 1] - _M_x[_M_p][__n - 1] - _M_carry);
_M_carry = __new_carry; _M_carry = __new_carry;
...@@ -623,11 +622,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -623,11 +622,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
const result_type __m1 = const result_type __m1 =
std::min(result_type(_M_b1.max() - _M_b1.min()), std::min(result_type(_M_b1.max() - _M_b1.min()),
_Shift<result_type, __w - __s1>::__value - 1); __detail::_Shift<result_type, __w - __s1>::__value - 1);
const result_type __m2 = const result_type __m2 =
std::min(result_type(_M_b2.max() - _M_b2.min()), std::min(result_type(_M_b2.max() - _M_b2.min()),
_Shift<result_type, __w - __s2>::__value - 1); __detail::_Shift<result_type, __w - __s2>::__value - 1);
// NB: In TR1 s1 is not required to be >= s2. // NB: In TR1 s1 is not required to be >= s2.
if (__s1 < __s2) if (__s1 < __s2)
......
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
#include <ext/rope> #include <ext/rope>
#include <ext/stdio_filebuf.h> #include <ext/stdio_filebuf.h>
namespace
{
const int min_len = _S_max_rope_depth + 1;
}
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
namespace
{
const int min_len = __detail::_S_max_rope_depth + 1;
}
template template
const unsigned long const unsigned long
rope<char, std::allocator<char> >::_S_min_len[min_len]; rope<char, std::allocator<char> >::_S_min_len[min_len];
......
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