[libcxx-commits] [libcxx] 0b8da5f - [libc++] s/std::size_t/size_t/g. NFCI.

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 11 09:24:49 PDT 2021


Author: Arthur O'Dwyer
Date: 2021-05-11T12:23:55-04:00
New Revision: 0b8da5fa5915f1cea790c7e246195e30afd9e391

URL: https://github.com/llvm/llvm-project/commit/0b8da5fa5915f1cea790c7e246195e30afd9e391
DIFF: https://github.com/llvm/llvm-project/commit/0b8da5fa5915f1cea790c7e246195e30afd9e391.diff

LOG: [libc++] s/std::size_t/size_t/g. NFCI.

Added: 
    

Modified: 
    libcxx/include/experimental/functional
    libcxx/include/type_traits

Removed: 
    


################################################################################
diff  --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional
index d8f80ee57c42..47f9ca5493d9 100644
--- a/libcxx/include/experimental/functional
+++ b/libcxx/include/experimental/functional
@@ -154,7 +154,7 @@ public: // TODO private:
 
 public:
     _LIBCPP_INLINE_VISIBILITY
-    _BMSkipTable(std::size_t __sz, _Value __default, _Hash __hf, _BinaryPredicate __pred)
+    _BMSkipTable(size_t __sz, _Value __default, _Hash __hf, _BinaryPredicate __pred)
         : __default_value_(__default), __table(__sz, __hf, __pred) {}
 
     _LIBCPP_INLINE_VISIBILITY
@@ -179,13 +179,13 @@ private:
     typedef _Value value_type;
     typedef _Key   key_type;
 
-    typedef typename std::make_unsigned<key_type>::type unsigned_key_type;
-    typedef std::array<value_type, _VSTD::numeric_limits<unsigned_key_type>::max()> skip_map;
+    typedef typename make_unsigned<key_type>::type unsigned_key_type;
+    typedef std::array<value_type, numeric_limits<unsigned_key_type>::max()> skip_map;
     skip_map __table;
 
 public:
     _LIBCPP_INLINE_VISIBILITY
-    _BMSkipTable(std::size_t /*__sz*/, _Value __default, _Hash /*__hf*/, _BinaryPredicate /*__pred*/)
+    _BMSkipTable(size_t /*__sz*/, _Value __default, _Hash /*__hf*/, _BinaryPredicate /*__pred*/)
     {
         std::fill_n(__table.begin(), __table.size(), __default);
     }
@@ -299,11 +299,11 @@ public: // TODO private:
     template<typename _Iterator, typename _Container>
     void __compute_bm_prefix ( _Iterator __f, _Iterator __l, _BinaryPredicate __pred, _Container &__prefix )
     {
-        const std::size_t __count = _VSTD::distance(__f, __l);
+        const size_t __count = _VSTD::distance(__f, __l);
 
         __prefix[0] = 0;
-        std::size_t __k = 0;
-        for ( std::size_t __i = 1; __i < __count; ++__i )
+        size_t __k = 0;
+        for ( size_t __i = 1; __i < __count; ++__i )
         {
             while ( __k > 0 && !__pred ( __f[__k], __f[__i] ))
                 __k = __prefix [ __k - 1 ];
@@ -317,22 +317,22 @@ public: // TODO private:
     void __build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
                                                     _BinaryPredicate __pred)
     {
-        const std::size_t __count = _VSTD::distance(__f, __l);
+        const size_t __count = _VSTD::distance(__f, __l);
         vector<
diff erence_type> & __suffix = *__suffix_.get();
         if (__count > 0)
         {
             _VSTD::vector<value_type> __scratch(__count);
 
             __compute_bm_prefix(__f, __l, __pred, __scratch);
-            for ( std::size_t __i = 0; __i <= __count; __i++ )
+            for ( size_t __i = 0; __i <= __count; __i++ )
                 __suffix[__i] = __count - __scratch[__count-1];
 
             typedef _VSTD::reverse_iterator<_RandomAccessIterator1> _RevIter;
             __compute_bm_prefix(_RevIter(__l), _RevIter(__f), __pred, __scratch);
 
-            for ( std::size_t __i = 0; __i < __count; __i++ )
+            for ( size_t __i = 0; __i < __count; __i++ )
             {
-                const std::size_t     __j = __count - __scratch[__i];
+                const size_t     __j = __count - __scratch[__i];
                 const 
diff erence_type __k = __i     - __scratch[__i] + 1;
 
                 if (__suffix[__j] > __k)

diff  --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index 6849924ae449..2aebea71d329 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -216,9 +216,9 @@ namespace std
       using add_pointer_t    = typename add_pointer<T>::type;  // C++14
 
     // other transformations:
-    template <size_t Len, std::size_t Align=default-alignment>
+    template <size_t Len, size_t Align=default-alignment>
       using aligned_storage_t = typename aligned_storage<Len,Align>::type;  // C++14
-    template <std::size_t Len, class... Types>
+    template <size_t Len, class... Types>
       using aligned_union_t   = typename aligned_union<Len,Types...>::type;  // C++14
     template <class T>
       using remove_cvref_t    = typename remove_cvref<T>::type;  // C++20


        


More information about the libcxx-commits mailing list