| 281 | } |
| 282 | |
| 283 | constexpr bool insert(const_iterator pos, const T& data) noexcept( |
| 284 | noexcept(nothrow_migrate(std::addressof(data()[0]), std::move(data()[0]))) && noexcept(nothrow_migrate(std::addressof(data()[0]), data()[0]))) |
| 285 | requires std::is_copy_constructible_v<T> |
| 286 | { |
| 287 | if (pos == end()) { |
| 288 | return push_back(std::forward<const T&>(data)); |
| 289 | } |
| 290 | if (size() < capacity()) { |
| 291 | for (auto i = end() - 1; i >= pos; i--) { |
| 292 | // Special case to increase size |
| 293 | if (i + 1 == end()) { |
| 294 | emplace_back(std::move(*(end() - 1))); |
| 295 | } |
| 296 | else { |
| 297 | nothrow_migrate(std::addressof(*(i + 1)), std::move(*i)); |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | nothrow_migrate(begin() + (pos - begin()), data); |
| 302 | |
| 303 | return true; |
| 304 | } |
| 305 | |
| 306 | return false; |
| 307 | } |
| 308 | |
| 309 | constexpr bool insert(const_iterator pos, T&& data) noexcept(noexcept(nothrow_migrate(std::addressof(data()[0]), std::move(data()[0])))) |
| 310 | requires std::is_move_constructible_v<T> |
no test coverage detected