| 156 | } |
| 157 | |
| 158 | void move_construct(SmallVectorStorage&& other) noexcept { |
| 159 | size_ = other.size_; |
| 160 | dynamic_capacity_ = other.dynamic_capacity_; |
| 161 | if (dynamic_capacity_) { |
| 162 | data_ = other.data_; |
| 163 | other.data_ = other.static_data_; |
| 164 | other.dynamic_capacity_ = 0; |
| 165 | other.size_ = 0; |
| 166 | } else if (size_ != 0) { |
| 167 | // Use a compile-time memcpy size (N) for trivial types |
| 168 | storage_type::move_construct_several(other.static_data_, static_data_, size_, N); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | constexpr size_t capacity() const { return dynamic_capacity_ ? dynamic_capacity_ : N; } |
| 173 |
no outgoing calls
no test coverage detected