diff --git a/include/beman/inplace_vector/inplace_vector.hpp b/include/beman/inplace_vector/inplace_vector.hpp index fa35dbd..7b1b3af 100644 --- a/include/beman/inplace_vector/inplace_vector.hpp +++ b/include/beman/inplace_vector/inplace_vector.hpp @@ -252,7 +252,7 @@ prospectively choose to deem waived or otherwise exclude such Section(s) of the License, but only in their entirety and only with respect to the Combined Software. */ -#include // for rotate, equals, move_backwards, ... +#include // for rotate... #include #include // for lots... #include // for size_t @@ -321,38 +321,39 @@ static constexpr void __assert_failure(char const *__file, int __line, } } -using namespace std; using namespace beman::__iv_detail; // clang-format off // Smallest unsigned integer that can represent values in [0, N]. template using __smallest_size_t -= conditional_t<(__N < numeric_limits::max()), uint8_t, - conditional_t<(__N < numeric_limits::max()), uint16_t, - conditional_t<(__N < numeric_limits::max()), uint32_t, - conditional_t<(__N < numeric_limits::max()), uint64_t, += std::conditional_t<(__N < std::numeric_limits::max()), uint8_t, + std::conditional_t<(__N < std::numeric_limits::max()), uint16_t, + std::conditional_t<(__N < std::numeric_limits::max()), uint32_t, + std::conditional_t<(__N < std::numeric_limits::max()), uint64_t, size_t>>>>; // clang-format on // Index a random-access and sized range doing bound checks in debug builds -template +template static constexpr decltype(auto) __index(__Rng &&__rng, __Index __i) noexcept - requires(ranges::sized_range<__Rng>) + requires(std::ranges::sized_range<__Rng>) { - __IV_EXPECT(static_cast(__i) < ranges::size(__rng)); - return begin(::std::forward<__Rng>(__rng))[::std::forward<__Index>(__i)]; + __IV_EXPECT(static_cast(__i) < std::ranges::size(__rng)); + return std::begin(std::forward<__Rng>(__rng))[std::forward<__Index>(__i)]; } // http://eel.is/c++draft/container.requirements.general#container.intro.reqmts-2 template concept __container_compatible_range = - ranges::input_range<__Rng> && - convertible_to, __T>; + std::ranges::input_range<__Rng> && + std::convertible_to, __T>; template concept __move_or_copy_insertable_from = requires(__Ptr __ptr, __T &&__value) { - { construct_at(__ptr, ::std::forward<__T &&>(__value)) } -> same_as<__Ptr>; + { + std::construct_at(__ptr, std::forward<__T &&>(__value)) + } -> std::same_as<__Ptr>; }; } // namespace beman::__iv_detail @@ -362,7 +363,7 @@ namespace beman::__iv_detail::__storage { // TODO: flesh out template struct __aligned_storage2 { - alignas(__T) byte __d[sizeof(__T) * __N]; + alignas(__T) std::byte __d[sizeof(__T) * __N]; constexpr __T *__data(size_t __i) noexcept { __IV_EXPECT(__i < __N); return reinterpret_cast<__T *>(__d) + __i; @@ -395,7 +396,7 @@ template struct __zero_sized { // Storage for trivial types. template struct __trivial { - static_assert(is_trivial_v<__T>, + static_assert(std::is_trivial_v<__T>, "storage::trivial requires Trivial"); static_assert(__N != size_t{0}, "__N == 0, use __zero_sized"); @@ -403,9 +404,10 @@ template struct __trivial { using __size_type = __smallest_size_t<__N>; private: - // If value_type is const, then const array of non-const elements: - using __data_t = conditional_t, array<__T, __N>, - const array, __N>>; + // If value_type is const, then const std::array of non-const elements: + using __data_t = + std::conditional_t, std::array<__T, __N>, + const std::array, __N>>; alignas(alignof(__T)) __data_t __data_{}; __size_type __size_ = 0; @@ -430,7 +432,7 @@ template struct __trivial { /// Storage for non-trivial elements. template struct __non_trivial { - static_assert(!is_trivial_v<__T>, + static_assert(!std::is_trivial_v<__T>, "use storage::trivial for Trivial elements"); static_assert(__N != size_t{0}, "use storage::zero for __N==0"); @@ -438,9 +440,9 @@ template struct __non_trivial { using __size_type = __smallest_size_t<__N>; private: - using __data_t = - conditional_t, __aligned_storage2<__T, __N>, - const __aligned_storage2, __N>>; + using __data_t = std::conditional_t< + !std::is_const_v<__T>, __aligned_storage2<__T, __N>, + const __aligned_storage2, __N>>; __data_t __data_{}; // BUGBUG: test SIMD types __size_type __size_ = 0; @@ -462,28 +464,27 @@ template struct __non_trivial { constexpr __non_trivial &operator=(__non_trivial &&) noexcept = default; constexpr ~__non_trivial() - requires(is_trivially_destructible_v<__T>) + requires(std::is_trivially_destructible_v<__T>) = default; - constexpr ~__non_trivial() { destroy(__data(), __data() + __size()); } + constexpr ~__non_trivial() { std::destroy(__data(), __data() + __size()); } }; // Selects the vector storage. template -using _t = conditional_t<__N == 0, __zero_sized<__T>, - conditional_t, __trivial<__T, __N>, - __non_trivial<__T, __N>>>; +using _t = std::conditional_t< + __N == 0, __zero_sized<__T>, + std::conditional_t, __trivial<__T, __N>, + __non_trivial<__T, __N>>>; } // namespace beman::__iv_detail::__storage namespace beman { -using namespace std; - /// Dynamically-resizable fixed-__N vector with inplace storage. template struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { private: - static_assert(is_nothrow_destructible_v<__T>, + static_assert(std::is_nothrow_destructible_v<__T>, "T must be nothrow destructible"); using __base_t = __iv_detail::__storage::_t<__T, __N>; using __self = inplace_vector<__T, __N>; @@ -498,11 +499,11 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { using reference = value_type &; using const_reference = const value_type &; using size_type = size_t; - using difference_type = ptrdiff_t; + using difference_type = std::ptrdiff_t; using iterator = pointer; using const_iterator = const_pointer; - using reverse_iterator = ::std::reverse_iterator; - using const_reverse_iterator = ::std::reverse_iterator; + using reverse_iterator = std::reverse_iterator; + using const_reverse_iterator = std::reverse_iterator; // [containers.sequences.inplace_vector.cons], construct/copy/destroy constexpr inplace_vector() noexcept = default; @@ -517,8 +518,8 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { // constexpr inplace_vector(const inplace_vector&); // from base-class, trivial if is_trivially_move_constructible_v // constexpr inplace_vector(inplace_vector&&) noexcept(__N == 0 || - // is_nothrow_move_constructible_v<__T>); - // constexpr inplace_vector(initializer_list<__T> __il); + // std::is_nothrow_move_constructible_v<__T>); + // constexpr inplace_vector(std::initializer_list<__T> __il); // from base-class, trivial if is_trivially_destructible_v<__T> // constexpr ~inplace_vector(); // from base-class, trivial if is_trivially_destructible_v<__T> && @@ -533,7 +534,7 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { // template<__iv_detail::__container_compatible_range<__T> __R> // constexpr void assign_range(__R&& __rg); // constexpr void assign(size_type __n, const __T& __u); - // constexpr void assign(initializer_list<__T> __il); + // constexpr void assign(std::initializer_list<__T> __il); // iterators constexpr iterator begin() noexcept { return __data(); } @@ -570,7 +571,7 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { // constexpr void resize(size_type __sz, const __T& __c); constexpr void reserve(size_type __n) { if (__n > __N) [[unlikely]] - throw bad_alloc(); + throw std::bad_alloc(); } constexpr void shrink_to_fit() {} @@ -630,23 +631,24 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { // __first, __InputIterator __last); // template<__iv_detail::__container_compatible_range<__T> __R> // constexpr iterator insert_range(const_iterator __position, __R&& __rg); - // constexpr iterator insert(const_iterator __position, initializer_list<__T> + // constexpr iterator insert(const_iterator __position, + // std::initializer_list<__T> // __il); constexpr iterator erase(const_iterator __position); constexpr // iterator erase(const_iterator __first, const_iterator __last); constexpr // void swap(inplace_vector& __x) - // noexcept(__N == 0 || (is_nothrow_swappable_v<__T> && - // is_nothrow_move_constructible_v<__T>)); + // noexcept(__N == 0 || (std::is_nothrow_swappable_v<__T> && + // std::is_nothrow_move_constructible_v<__T>)); // constexpr void clear() noexcept; constexpr friend bool operator==(const inplace_vector &__x, const inplace_vector &__y) { - return __x.size() == __y.size() && ::std::ranges::equal(__x, __y); + return __x.size() == __y.size() && std::ranges::equal(__x, __y); } // constexpr friend auto /*synth-three-way-result*/ // operator<=>(const inplace_vector& __x, const inplace_vector& __y); constexpr friend void swap(inplace_vector &__x, inplace_vector &__y) noexcept( - __N == 0 || - (is_nothrow_swappable_v<__T> && is_nothrow_move_constructible_v<__T>)) { + __N == 0 || (std::is_nothrow_swappable_v<__T> && + std::is_nothrow_move_constructible_v<__T>)) { __x.swap(__y); } @@ -668,9 +670,9 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { } constexpr void __unsafe_destroy(__T *__first, - __T *__last) noexcept(is_nothrow_destructible_v<__T>) { + __T *__last) noexcept(std::is_nothrow_destructible_v<__T>) { __assert_iterator_pair_in_range(__first, __last); - if constexpr (__N > 0 && !is_trivial_v<__T>) { + if constexpr (__N > 0 && !std::is_trivial_v<__T>) { for (; __first != __last; ++__first) __first->~__T(); } @@ -683,10 +685,10 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { template constexpr __T &unchecked_emplace_back(__Args &&...__args) - requires(constructible_from<__T, __Args...>) + requires(std::constructible_from<__T, __Args...>) { __IV_EXPECT(size() < capacity() && "inplace_vector out-of-memory"); - construct_at(end(), ::std::forward<__Args>(__args)...); + std::construct_at(end(), std::forward<__Args>(__args)...); __unsafe_set_size(size() + size_type(1)); return back(); } @@ -695,195 +697,200 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { constexpr __T *try_emplace_back(__Args &&...__args) { if (size() == capacity()) [[unlikely]] return nullptr; - return &unchecked_emplace_back(::std::forward<__Args>(__args)...); + return &unchecked_emplace_back(std::forward<__Args>(__args)...); } template constexpr __T &emplace_back(__Args &&...__args) - requires(constructible_from<__T, __Args...>) + requires(std::constructible_from<__T, __Args...>) { - if (!try_emplace_back(::std::forward<__Args>(__args)...)) [[unlikely]] - throw bad_alloc(); + if (!try_emplace_back(std::forward<__Args>(__args)...)) [[unlikely]] + throw std::bad_alloc(); return back(); } constexpr __T &push_back(const __T &__x) - requires(constructible_from<__T, const __T &>) + requires(std::constructible_from<__T, const __T &>) { emplace_back(__x); return back(); } constexpr __T &push_back(__T &&__x) - requires(constructible_from<__T, __T &&>) + requires(std::constructible_from<__T, __T &&>) { - emplace_back(::std::forward<__T &&>(__x)); + emplace_back(std::forward<__T &&>(__x)); return back(); } constexpr __T *try_push_back(const __T &__x) - requires(constructible_from<__T, const __T &>) + requires(std::constructible_from<__T, const __T &>) { return try_emplace_back(__x); } constexpr __T *try_push_back(__T &&__x) - requires(constructible_from<__T, __T &&>) + requires(std::constructible_from<__T, __T &&>) { - return try_emplace_back(::std::forward<__T &&>(__x)); + return try_emplace_back(std::forward<__T &&>(__x)); } constexpr __T &unchecked_push_back(const __T &__x) - requires(constructible_from<__T, const __T &>) + requires(std::constructible_from<__T, const __T &>) { return unchecked_emplace_back(__x); } constexpr __T &unchecked_push_back(__T &&__x) - requires(constructible_from<__T, __T &&>) + requires(std::constructible_from<__T, __T &&>) { - return unchecked_emplace_back(::std::forward<__T &&>(__x)); + return unchecked_emplace_back(std::forward<__T &&>(__x)); } template <__iv_detail::__container_compatible_range<__T> __R> constexpr void append_range(__R &&__rg) - requires(constructible_from<__T, ranges::range_reference_t<__R>>) + requires(std::constructible_from<__T, std::ranges::range_reference_t<__R>>) { - if constexpr (ranges::sized_range<__R>) { - if (size() + ranges::size(__rg) > capacity()) [[unlikely]] - throw bad_alloc(); + if constexpr (std::ranges::sized_range<__R>) { + if (size() + std::ranges::size(__rg) > capacity()) [[unlikely]] + throw std::bad_alloc(); } for (auto &&__e : __rg) { if (size() == capacity()) [[unlikely]] - throw bad_alloc(); - emplace_back(::std::forward(__e)); + throw std::bad_alloc(); + emplace_back(std::forward(__e)); } } template constexpr iterator emplace(const_iterator __position, __Args &&...__args) - requires(constructible_from<__T, __Args...> && movable<__T>) + requires(std::constructible_from<__T, __Args...> && std::movable<__T>) { __assert_iterator_in_range(__position); auto __b = end(); emplace_back(std::forward<__Args>(__args)...); auto __pos = begin() + (__position - begin()); - rotate(__pos, __b, end()); + std::rotate(__pos, __b, end()); return __pos; } template constexpr iterator insert(const_iterator __position, __InputIterator __first, __InputIterator __last) - requires(constructible_from<__T, iter_reference_t<__InputIterator>> && - movable<__T>) + requires( + std::constructible_from<__T, std::iter_reference_t<__InputIterator>> && + std::movable<__T>) { __assert_iterator_in_range(__position); - // __assert_valid_iterator_pair(__first, __last); // does not work with - // arbitrary InputIterators - if constexpr (random_access_iterator<__InputIterator>) { - if (size() + static_cast(distance(__first, __last)) > + if constexpr (std::random_access_iterator<__InputIterator>) { + if (size() + static_cast(std::distance(__first, __last)) > capacity()) [[unlikely]] - throw bad_alloc{}; + throw std::bad_alloc{}; } auto __b = end(); for (; __first != __last; ++__first) - emplace_back(::std::move(*__first)); + emplace_back(std::move(*__first)); auto __pos = begin() + (__position - begin()); - rotate(__pos, __b, end()); + std::rotate(__pos, __b, end()); return __pos; } template <__iv_detail::__container_compatible_range<__T> __R> constexpr iterator insert_range(const_iterator __position, __R &&__rg) - requires(constructible_from<__T, ranges::range_reference_t<__R>> && - movable<__T>) + requires( + std::constructible_from<__T, std::ranges::range_reference_t<__R>> && + std::movable<__T>) { - return insert(__position, ::std::begin(__rg), ::std::end(__rg)); + return insert(__position, std::begin(__rg), std::end(__rg)); } constexpr iterator insert(const_iterator __position, - initializer_list<__T> __il) - requires(constructible_from< - __T, ranges::range_reference_t>> && - movable<__T>) + std::initializer_list<__T> __il) + requires( + std::constructible_from< + __T, std::ranges::range_reference_t>> && + std::movable<__T>) { return insert_range(__position, __il); } constexpr iterator insert(const_iterator __position, size_type __n, const __T &__x) - requires(constructible_from<__T, const __T &> && copyable<__T>) + requires(std::constructible_from<__T, const __T &> && std::copyable<__T>) { __assert_iterator_in_range(__position); auto __b = end(); for (size_type __i = 0; __i < __n; ++__i) emplace_back(__x); auto __pos = begin() + (__position - begin()); - rotate(__pos, __b, end()); + std::rotate(__pos, __b, end()); return __pos; } constexpr iterator insert(const_iterator __position, const __T &__x) - requires(constructible_from<__T, const __T &> && copyable<__T>) + requires(std::constructible_from<__T, const __T &> && std::copyable<__T>) { return insert(__position, 1, __x); } constexpr iterator insert(const_iterator __position, __T &&__x) - requires(constructible_from<__T, __T &&> && movable<__T>) + requires(std::constructible_from<__T, __T &&> && std::movable<__T>) { - return emplace(__position, ::std::move(__x)); + return emplace(__position, std::move(__x)); } - constexpr inplace_vector(initializer_list<__T> __il) - requires(constructible_from< - __T, ranges::range_reference_t>> && - movable<__T>) + constexpr inplace_vector(std::initializer_list<__T> __il) + requires( + std::constructible_from< + __T, std::ranges::range_reference_t>> && + std::movable<__T>) { insert(begin(), __il); } constexpr inplace_vector(size_type __n, const __T &__value) - requires(constructible_from<__T, const __T &> && copyable<__T>) + requires(std::constructible_from<__T, const __T &> && std::copyable<__T>) { insert(begin(), __n, __value); } constexpr explicit inplace_vector(size_type __n) - requires(constructible_from<__T, __T &&> && default_initializable<__T>) + requires(std::constructible_from<__T, __T &&> && + std::default_initializable<__T>) { for (size_type __i = 0; __i < __n; ++__i) emplace_back(__T{}); } - template // BUGBUG: why not ranges::input_iterator? + template < + class __InputIterator> // BUGBUG: why not std::ranges::input_iterator? constexpr inplace_vector(__InputIterator __first, __InputIterator __last) - requires(constructible_from<__T, iter_reference_t<__InputIterator>> && - movable<__T>) + requires( + std::constructible_from<__T, std::iter_reference_t<__InputIterator>> && + std::movable<__T>) { insert(begin(), __first, __last); } template <__iv_detail::__container_compatible_range<__T> __R> constexpr inplace_vector(from_range_t, __R &&__rg) - requires(constructible_from<__T, ranges::range_reference_t<__R>> && - movable<__T>) + requires( + std::constructible_from<__T, std::ranges::range_reference_t<__R>> && + std::movable<__T>) { insert_range(begin(), std::forward<__R &&>(__rg)); } constexpr iterator erase(const_iterator __first, const_iterator __last) - requires(movable<__T>) + requires(std::movable<__T>) { __assert_iterator_pair_in_range(__first, __last); iterator __f = begin() + (__first - begin()); if (__first != __last) { - __unsafe_destroy(::std::move(__f + (__last - __first), end(), __f), - end()); + __unsafe_destroy(std::move(__f + (__last - __first), end(), __f), end()); __unsafe_set_size(size() - static_cast(__last - __first)); } return __f; } constexpr iterator erase(const_iterator __position) - requires(movable<__T>) + requires(std::movable<__T>) { return erase(__position, __position + 1); } @@ -894,12 +901,12 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { } constexpr void resize(size_type __sz, const __T &__c) - requires(constructible_from<__T, const __T &> && copyable<__T>) + requires(std::constructible_from<__T, const __T &> && std::copyable<__T>) { if (__sz == size()) return; else if (__sz > __N) [[unlikely]] - throw bad_alloc{}; + throw std::bad_alloc{}; else if (__sz > size()) insert(end(), __sz - size(), __c); else { @@ -908,12 +915,13 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { } } constexpr void resize(size_type __sz) - requires(constructible_from<__T, __T &&> && default_initializable<__T>) + requires(std::constructible_from<__T, __T &&> && + std::default_initializable<__T>) { if (__sz == size()) return; else if (__sz > __N) [[unlikely]] - throw bad_alloc{}; + throw std::bad_alloc{}; else if (__sz > size()) while (size() != __sz) emplace_back(__T{}); @@ -925,12 +933,12 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { constexpr reference at(size_type __pos) { if (__pos >= size()) [[unlikely]] - throw out_of_range("inplace_vector::at"); + throw std::out_of_range("inplace_vector::at"); return __iv_detail::__index(*this, __pos); } constexpr const_reference at(size_type __pos) const { if (__pos >= size()) [[unlikely]] - throw out_of_range("inplace_vector::at"); + throw std::out_of_range("inplace_vector::at"); return __iv_detail::__index(*this, __pos); } @@ -941,27 +949,27 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { } constexpr inplace_vector(const inplace_vector &__x) - requires(__N == 0 || is_trivially_copy_constructible_v<__T>) + requires(__N == 0 || std::is_trivially_copy_constructible_v<__T>) = default; constexpr inplace_vector(const inplace_vector &__x) - requires(__N != 0 && !is_trivially_copy_constructible_v<__T> && - copyable<__T>) + requires(__N != 0 && !std::is_trivially_copy_constructible_v<__T> && + std::copyable<__T>) { for (auto &&__e : __x) emplace_back(__e); } constexpr inplace_vector(inplace_vector &&__x) - requires(__N == 0 || is_trivially_move_constructible_v<__T>) + requires(__N == 0 || std::is_trivially_move_constructible_v<__T>) = default; constexpr inplace_vector(inplace_vector &&__x) - requires(__N != 0 && !is_trivially_move_constructible_v<__T> && - movable<__T>) + requires(__N != 0 && !std::is_trivially_move_constructible_v<__T> && + std::movable<__T>) { for (auto &&__e : __x) - emplace_back(::std::move(__e)); + emplace_back(std::move(__e)); } constexpr inplace_vector &operator=(const inplace_vector &__x) @@ -975,7 +983,7 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { !(std::is_trivially_destructible_v<__T> && std::is_trivially_copy_constructible_v<__T> && std::is_trivially_copy_assignable_v<__T>) && - copyable<__T>) + std::copyable<__T>) { clear(); for (auto &&__e : __x) @@ -994,49 +1002,52 @@ struct inplace_vector : private __iv_detail::__storage::_t<__T, __N> { !(std::is_trivially_destructible_v<__T> && std::is_trivially_move_constructible_v<__T> && std::is_trivially_move_assignable_v<__T>) && - movable<__T>) + std::movable<__T>) { clear(); for (auto &&__e : __x) - emplace_back(::std::move(__e)); + emplace_back(std::move(__e)); return *this; } constexpr void swap(inplace_vector &__x) noexcept( - __N == 0 || - (is_nothrow_swappable_v<__T> && is_nothrow_move_constructible_v<__T>)) - requires(movable<__T>) + __N == 0 || (std::is_nothrow_swappable_v<__T> && + std::is_nothrow_move_constructible_v<__T>)) + requires(std::movable<__T>) { - auto tmp = ::std::move(__x); - __x = ::std::move(*this); - (*this) = ::std::move(tmp); + auto tmp = std::move(__x); + __x = std::move(*this); + (*this) = std::move(tmp); } template constexpr void assign(__InputIterator __first, __InputIterator __last) - requires(constructible_from<__T, iter_reference_t<__InputIterator>> && - movable<__T>) + requires( + std::constructible_from<__T, std::iter_reference_t<__InputIterator>> && + std::movable<__T>) { clear(); insert(begin(), __first, __last); } template <__iv_detail::__container_compatible_range<__T> __R> constexpr void assign_range(__R &&__rg) - requires(constructible_from<__T, ranges::range_reference_t<__R>> && - movable<__T>) + requires( + std::constructible_from<__T, std::ranges::range_reference_t<__R>> && + std::movable<__T>) { assign(std::begin(__rg), std::end(__rg)); } constexpr void assign(size_type __n, const __T &__u) - requires(constructible_from<__T, const __T &> && movable<__T>) + requires(std::constructible_from<__T, const __T &> && std::movable<__T>) { clear(); insert(begin(), __n, __u); } - constexpr void assign(initializer_list<__T> __il) - requires(constructible_from< - __T, ranges::range_reference_t>> && - movable<__T>) + constexpr void assign(std::initializer_list<__T> __il) + requires( + std::constructible_from< + __T, std::ranges::range_reference_t>> && + std::movable<__T>) { clear(); insert_range(begin(), __il); diff --git a/tests/beman/inplace_vector/container_requirements.test.cpp b/tests/beman/inplace_vector/container_requirements.test.cpp index f38f99f..ec91a00 100644 --- a/tests/beman/inplace_vector/container_requirements.test.cpp +++ b/tests/beman/inplace_vector/container_requirements.test.cpp @@ -998,7 +998,7 @@ TYPED_TEST(SequenceContainerRequirements, ElementAccess) { auto device = this->unique(); - for (auto i = 0uz; i < device.size(); ++i) + for (auto i = 0ul; i < device.size(); ++i) EXPECT_EQ(device[i], *(device.begin() + i)); }