]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/include/ext/rc_string_base.h
*: Use headername alias to associate private includes to public includes.
[thirdparty/gcc.git] / libstdc++-v3 / include / ext / rc_string_base.h
index 9831037bb15a5aca1e4a18d78231796fa5525b80..b4037d60558a7c8a85d1c83a932c7c107ce177f5 100644 (file)
@@ -24,9 +24,8 @@
 // <http://www.gnu.org/licenses/>.
 
 /** @file ext/rc_string_base.h
- *  This file is a GNU extension to the Standard C++ Library.
  *  This is an internal header file, included by other library headers.
- *  You should not attempt to use it directly.
+ *  Do not attempt to use it directly. @headername{ext/vstring.h}
  */
 
 #ifndef _RC_STRING_BASE_H
@@ -115,7 +114,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
            size_type       _M_capacity;
            _Atomic_word    _M_refcount;
          }                 _M_info;
-         
+
          // Only for alignment purposes.
          _CharT            _M_align;
        };
@@ -132,10 +131,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
          __atomic_add_dispatch(&_M_info._M_refcount, 1);
          return _M_refdata();
        }  // XXX MT
-       
+
        void
        _M_set_length(size_type __n)
-       { 
+       {
          _M_info._M_refcount = 0;  // One reference.
          _M_info._M_length = __n;
          // grrr. (per 21.3.4)
@@ -193,7 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       _M_grab(const _Alloc& __alloc) const
       {
        return (!_M_is_leaked() && _M_get_allocator() == __alloc)
-               ? _M_rep()->_M_refcopy() : _M_rep()->_M_clone(__alloc);
+               ? _M_rep()->_M_refcopy() : _M_rep()->_M_clone(__alloc);
       }
 
       void
@@ -225,19 +224,19 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       // _S_construct_aux is used to implement the 21.3.1 para 15 which
       // requires special behaviour if _InIterator is an integral type
       template<typename _InIterator>
-        static _CharT*
-        _S_construct_aux(_InIterator __beg, _InIterator __end,
+       static _CharT*
+       _S_construct_aux(_InIterator __beg, _InIterator __end,
                         const _Alloc& __a, std::__false_type)
        {
-          typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
-          return _S_construct(__beg, __end, __a, _Tag());
+         typedef typename iterator_traits<_InIterator>::iterator_category _Tag;
+         return _S_construct(__beg, __end, __a, _Tag());
        }
 
       // _GLIBCXX_RESOLVE_LIB_DEFECTS
       // 438. Ambiguity in the "do the right thing" clause
       template<typename _Integer>
-        static _CharT*
-        _S_construct_aux(_Integer __beg, _Integer __end,
+       static _CharT*
+       _S_construct_aux(_Integer __beg, _Integer __end,
                         const _Alloc& __a, std::__true_type)
        { return _S_construct_aux_2(static_cast<size_type>(__beg),
                                    __end, __a); }
@@ -247,24 +246,24 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       { return _S_construct(__req, __c, __a); }
 
       template<typename _InIterator>
-        static _CharT*
-        _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
+       static _CharT*
+       _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a)
        {
          typedef typename std::__is_integer<_InIterator>::__type _Integral;
          return _S_construct_aux(__beg, __end, __a, _Integral());
-        }
+       }
 
       // For Input Iterators, used in istreambuf_iterators, etc.
       template<typename _InIterator>
-        static _CharT*
-         _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
+       static _CharT*
+        _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a,
                      std::input_iterator_tag);
-      
+
       // For forward_iterators up to random_access_iterators, used for
       // string::iterator, _CharT*, etc.
       template<typename _FwdIterator>
-        static _CharT*
-        _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
+       static _CharT*
+       _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a,
                     std::forward_iterator_tag);
 
       static _CharT*
@@ -322,11 +321,11 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       __rc_string_base(size_type __n, _CharT __c, const _Alloc& __a);
 
       template<typename _InputIterator>
-        __rc_string_base(_InputIterator __beg, _InputIterator __end,
+       __rc_string_base(_InputIterator __beg, _InputIterator __end,
                         const _Alloc& __a);
 
       ~__rc_string_base()
-      { _M_dispose(); }      
+      { _M_dispose(); }
 
       allocator_type&
       _M_get_allocator()
@@ -348,7 +347,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       void
       _M_mutate(size_type __pos, size_type __len1, const _CharT* __s,
                size_type __len2);
-      
+
       void
       _M_erase(size_type __pos, size_type __n);
 
@@ -604,7 +603,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
        _M_set_sharable();
       if (__rcs._M_is_leaked())
        __rcs._M_set_sharable();
-      
+
       _CharT* __tmp = _M_data();
       _M_data(__rcs._M_data());
       __rcs._M_data(__tmp);
@@ -613,7 +612,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       // 431. Swapping containers with unequal allocators.
       std::__alloc_swap<allocator_type>::_S_do_it(_M_get_allocator(),
                                                  __rcs._M_get_allocator());
-    } 
+    }
 
   template<typename _CharT, typename _Traits, typename _Alloc>
     void
@@ -636,7 +635,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       // Make sure we don't shrink below the current size.
       if (__res < _M_length())
        __res = _M_length();
-      
+
       if (__res != _M_capacity() || _M_is_shared())
        {
          _CharT* __tmp = _M_rep()->_M_clone(_M_get_allocator(),
@@ -653,10 +652,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
              size_type __len2)
     {
       const size_type __how_much = _M_length() - __pos - __len1;
-      
+
       _Rep* __r = _Rep::_S_create(_M_length() + __len2 - __len1,
                                  _M_capacity(), _M_get_allocator());
-      
+
       if (__pos)
        _S_copy(__r->_M_refdata(), _M_data(), __pos);
       if (__s && __len2)
@@ -664,7 +663,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
       if (__how_much)
        _S_copy(__r->_M_refdata() + __pos + __len2,
                _M_data() + __pos + __len1, __how_much);
-      
+
       _M_dispose();
       _M_data(__r->_M_refdata());
     }
@@ -676,7 +675,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
     {
       const size_type __new_size = _M_length() - __n;
       const size_type __how_much = _M_length() - __pos - __n;
-      
+
       if (_M_is_shared())
        {
          // Must reallocate.
@@ -699,7 +698,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
                  _M_data() + __pos + __n, __how_much);
        }
 
-      _M_rep()->_M_set_length(__new_size);      
+      _M_rep()->_M_set_length(__new_size);
     }
 
   template<>