]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/include/bits/vector.tcc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / include / bits / vector.tcc
index 4cf0e809fe9cec4a0568658e0cdc27bd12539ff6..27e63388feb1f950187a756b52ae753b29715f86 100644 (file)
@@ -1,6 +1,6 @@
 // Vector implementation (out of line) -*- C++ -*-
 
-// Copyright (C) 2001-2019 Free Software Foundation, Inc.
+// Copyright (C) 2001-2020 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -73,12 +73,11 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
          const size_type __old_size = size();
          pointer __tmp;
 #if __cplusplus >= 201103L
-         if constexpr (_S_use_relocate())
+         if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
            {
              __tmp = this->_M_allocate(__n);
-             std::__relocate_a(this->_M_impl._M_start,
-                               this->_M_impl._M_finish,
-                               __tmp, _M_get_Tp_allocator());
+             _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish,
+                         __tmp, _M_get_Tp_allocator());
            }
          else
 #endif
@@ -457,19 +456,15 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
          __new_finish = pointer();
 
 #if __cplusplus >= 201103L
-         if constexpr (_S_use_relocate())
+         if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
            {
-             __new_finish
-               = std::__relocate_a
-               (__old_start, __position.base(),
-                __new_start, _M_get_Tp_allocator());
+             __new_finish = _S_relocate(__old_start, __position.base(),
+                                        __new_start, _M_get_Tp_allocator());
 
              ++__new_finish;
 
-             __new_finish
-               = std::__relocate_a
-               (__position.base(), __old_finish,
-                __new_finish, _M_get_Tp_allocator());
+             __new_finish = _S_relocate(__position.base(), __old_finish,
+                                        __new_finish, _M_get_Tp_allocator());
            }
          else
 #endif
@@ -498,7 +493,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
          __throw_exception_again;
        }
 #if __cplusplus >= 201103L
-      if constexpr (!_S_use_relocate())
+      if _GLIBCXX17_CONSTEXPR (!_S_use_relocate())
 #endif
        std::_Destroy(__old_start, __old_finish, _M_get_Tp_allocator());
       _GLIBCXX_ASAN_ANNOTATE_REINIT;
@@ -638,8 +633,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
              const size_type __len =
                _M_check_len(__n, "vector::_M_default_append");
              pointer __new_start(this->_M_allocate(__len));
-#if __cplusplus >= 201103L
-             if constexpr (_S_use_relocate())
+             if _GLIBCXX17_CONSTEXPR (_S_use_relocate())
                {
                  __try
                    {
@@ -651,12 +645,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
                      _M_deallocate(__new_start, __len);
                      __throw_exception_again;
                    }
-                 std::__relocate_a(this->_M_impl._M_start,
-                                   this->_M_impl._M_finish,
-                                   __new_start, _M_get_Tp_allocator());
+                 _S_relocate(this->_M_impl._M_start, this->_M_impl._M_finish,
+                             __new_start, _M_get_Tp_allocator());
                }
              else
-#endif
                {
                  pointer __destroy_from = pointer();
                  __try