diff options
author | rtk0c <[email protected]> | 2022-06-28 12:17:48 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-06-28 12:17:48 -0700 |
commit | 6839736b8283a59eb743e1f6058c7d266a3e7f36 (patch) | |
tree | c9fafde01740753a93c3bf3830faa790b88b001c /source/10-common/SmallVector.hpp | |
parent | 8a244363c9171946aa6e4552ce0dcfc8edf761cb (diff) |
Changeset: 78 Replace "class" keyword in templates with "typename"
Diffstat (limited to 'source/10-common/SmallVector.hpp')
-rw-r--r-- | source/10-common/SmallVector.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/10-common/SmallVector.hpp b/source/10-common/SmallVector.hpp index e33a25d..3fc7519 100644 --- a/source/10-common/SmallVector.hpp +++ b/source/10-common/SmallVector.hpp @@ -55,7 +55,7 @@ class iterator_range; /// Using 64 bit size is desirable for cases like SmallVector<char>, where a /// 32 bit size would limit the vector to ~4GB. SmallVectors are used for /// buffering bitcode output - which can exceed 4GB. -template <class Size_T> +template <typename Size_T> class SmallVectorBase { protected: void* BeginX; @@ -97,12 +97,12 @@ protected: } }; -template <class T> +template <typename T> using SmallVectorSizeType = typename std::conditional<sizeof(T) < 4 && sizeof(void*) >= 8, uint64_t, uint32_t>::type; /// Figure out the offset of the first element. -template <class T, typename = void> +template <typename T, typename = void> struct SmallVectorAlignmentAndSize { alignas(SmallVectorBase<SmallVectorSizeType<T>>) char Base[sizeof( SmallVectorBase<SmallVectorSizeType<T>>)]; @@ -222,7 +222,7 @@ protected: /// Reserve enough space to add one element, and return the updated element /// pointer in case it was a reference to the storage. - template <class U> + template <typename U> static const T* reserveForParamAndGetAddressImpl(U* This, const T& Elt, size_t N) { size_t NewSize = This->size() + N; if (LLVM_LIKELY(NewSize <= This->capacity())) @@ -768,7 +768,7 @@ public: } private: - template <class ArgType> + template <typename ArgType> iterator insert_one_impl(iterator I, ArgType&& Elt) { // Callers ensure that ArgType is derived from T. static_assert( |