mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 20:34:26 +02:00
refactor: std::simd
-like integral_constant
usage added to member functions
This commit is contained in:
@@ -112,10 +112,10 @@ public:
|
||||
[[nodiscard]] constexpr const_reverse_iterator crend() const noexcept { return rend(); }
|
||||
|
||||
// capacity
|
||||
[[nodiscard]] constexpr size_type size() const noexcept { return N; }
|
||||
[[nodiscard]] constexpr size_type length() const noexcept { return size(); }
|
||||
[[nodiscard]] constexpr size_type max_size() const noexcept { return size(); }
|
||||
[[nodiscard]] constexpr bool empty() const noexcept { return size() == 0; }
|
||||
[[nodiscard]] static constexpr std::integral_constant<size_type, N> size() noexcept { return {}; }
|
||||
[[nodiscard]] static constexpr std::integral_constant<size_type, N> length() noexcept { return {}; }
|
||||
[[nodiscard]] static constexpr std::integral_constant<size_type, N> max_size() noexcept { return {}; }
|
||||
[[nodiscard]] static constexpr std::bool_constant<N == 0> empty() noexcept { return {}; }
|
||||
|
||||
// element access
|
||||
[[nodiscard]] constexpr const_reference operator[](size_type pos) const
|
||||
|
Reference in New Issue
Block a user