[libcxx-commits] [libcxx] 1d6117c - [libc++][NFC] Use std:: instead of _VSTD:: in construct_at.h

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 11 08:45:14 PST 2023


Author: Louis Dionne
Date: 2023-02-11T08:44:59-08:00
New Revision: 1d6117c8c4d232d21d690bcf572f431aa7e9482b

URL: https://github.com/llvm/llvm-project/commit/1d6117c8c4d232d21d690bcf572f431aa7e9482b
DIFF: https://github.com/llvm/llvm-project/commit/1d6117c8c4d232d21d690bcf572f431aa7e9482b.diff

LOG: [libc++][NFC] Use std:: instead of _VSTD:: in construct_at.h

Added: 
    

Modified: 
    libcxx/include/__memory/construct_at.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__memory/construct_at.h b/libcxx/include/__memory/construct_at.h
index ffee0022c2433..3953e9869d7e0 100644
--- a/libcxx/include/__memory/construct_at.h
+++ b/libcxx/include/__memory/construct_at.h
@@ -35,7 +35,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 template <class _Tp, class... _Args, class = decltype(::new(std::declval<void*>()) _Tp(std::declval<_Args>()...))>
 _LIBCPP_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&&... __args) {
   _LIBCPP_ASSERT(__location != nullptr, "null pointer given to construct_at");
-  return ::new (_VSTD::__voidify(*__location)) _Tp(_VSTD::forward<_Args>(__args)...);
+  return ::new (std::__voidify(*__location)) _Tp(std::forward<_Args>(__args)...);
 }
 
 #endif
@@ -71,7 +71,7 @@ template <class _Tp, typename enable_if<is_array<_Tp>::value, int>::type = 0>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void __destroy_at(_Tp* __loc) {
     _LIBCPP_ASSERT(__loc != nullptr, "null pointer given to destroy_at");
-    _VSTD::__destroy(_VSTD::begin(*__loc), _VSTD::end(*__loc));
+    std::__destroy(std::begin(*__loc), std::end(*__loc));
 }
 #endif
 
@@ -79,7 +79,7 @@ template <class _ForwardIterator>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _ForwardIterator __destroy(_ForwardIterator __first, _ForwardIterator __last) {
     for (; __first != __last; ++__first)
-        _VSTD::__destroy_at(_VSTD::addressof(*__first));
+        std::__destroy_at(std::addressof(*__first));
     return __first;
 }
 
@@ -88,28 +88,28 @@ _ForwardIterator __destroy(_ForwardIterator __first, _ForwardIterator __last) {
 template <class _Tp, enable_if_t<!is_array_v<_Tp>, int> = 0>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void destroy_at(_Tp* __loc) {
-    _VSTD::__destroy_at(__loc);
+    std::__destroy_at(__loc);
 }
 
 #if _LIBCPP_STD_VER > 17
 template <class _Tp, enable_if_t<is_array_v<_Tp>, int> = 0>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void destroy_at(_Tp* __loc) {
-  _VSTD::__destroy_at(__loc);
+  std::__destroy_at(__loc);
 }
 #endif
 
 template <class _ForwardIterator>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 void destroy(_ForwardIterator __first, _ForwardIterator __last) {
-  (void)_VSTD::__destroy(_VSTD::move(__first), _VSTD::move(__last));
+  (void)std::__destroy(std::move(__first), std::move(__last));
 }
 
 template <class _ForwardIterator, class _Size>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 _ForwardIterator destroy_n(_ForwardIterator __first, _Size __n) {
     for (; __n > 0; (void)++__first, --__n)
-        _VSTD::__destroy_at(_VSTD::addressof(*__first));
+        std::__destroy_at(std::addressof(*__first));
     return __first;
 }
 


        


More information about the libcxx-commits mailing list