-
Notifications
You must be signed in to change notification settings - Fork 11
implement missing functions #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
41c92e9
640db7d
829d1ff
7e7696d
aef56ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -475,6 +475,18 @@ struct inplace_vector | |
| } | ||
| } | ||
|
|
||
| template <details::inplace_vector::container_compatible_range<T> R> | ||
| constexpr std::ranges::borrowed_iterator_t<R> try_append_range(R &&rg) | ||
| requires(std::constructible_from<T, std::ranges::range_reference_t<R>>) | ||
| { | ||
| auto it = std::ranges::begin(rg); | ||
| const auto end = std::ranges::end(rg); | ||
| for (; size() != capacity() && it != end; ++it) { | ||
| unchecked_emplace_back(*it); | ||
| } | ||
| return it; | ||
| } | ||
|
|
||
| template <class... Args> | ||
| constexpr iterator emplace(const_iterator position, Args &&...args) | ||
| requires(std::constructible_from<T, Args...> && std::movable<T>) | ||
|
|
@@ -717,6 +729,16 @@ struct inplace_vector | |
| return *this; | ||
| } | ||
|
|
||
| constexpr inplace_vector &operator=(std::initializer_list<T> il) | ||
| requires(std::constructible_from< | ||
| T, std::ranges::range_reference_t<std::initializer_list<T>>> && | ||
| std::movable<T>) | ||
| { | ||
| clear(); | ||
|
||
| insert_range(begin(), il); | ||
| return *this; | ||
| } | ||
|
|
||
| constexpr void | ||
| swap(inplace_vector &x) noexcept(N == 0 || | ||
| (std::is_nothrow_swappable_v<T> && | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.