23 #include <type_traits> 43 template <
typename...
Args>
46 using storage_type::storage_type;
91 template <
typename...
Args>
98 template <
typename Arg>
100 return std::forward<Arg>(arg);
102 template <
typename Arg>
106 template <
typename Arg>
125 template <
size_t I,
typename...
Args>
127 using Out = std::tuple<
Args...>;
129 std::forward<std::tuple_element_t<I, Out>>(std::get<I>(args)));
131 template <
size_t I,
typename...
Args>
135 template <
size_t I,
typename...
Args>
139 template <
size_t I,
typename Args>
143 template <
size_t I,
typename Args>
145 return std::get<I>(args);
147 template <
size_t I,
typename Args>
149 return std::get<I>(args);
156 template <
typename Container>
159 : container(
std::addressof(c)), iter(
std::
move(i)) {}
160 template <
typename...
Args>
162 iter = container->emplace(iter, std::forward<Args>(args)...);
166 typename Container::iterator
iter;
172 template <
typename Container>
175 : container(
std::addressof(c)), iter(
std::
move(i)) {}
176 template <
typename...
Args>
178 iter = container->emplace_hint(iter, std::forward<Args>(args)...);
182 typename Container::iterator
iter;
188 template <
typename Container>
191 template <
typename...
Args>
193 container->emplace_front(std::forward<Args>(args)...);
201 template <
typename Container>
204 template <
typename...
Args>
206 container->emplace_back(std::forward<Args>(args)...);
217 template <
typename Derived,
typename EmplaceImpl,
bool implicit_unpack>
224 template <
typename Derived,
typename EmplaceImpl>
226 :
protected EmplaceImpl {
235 std::remove_reference_t<decltype(*EmplaceImpl::container)>;
237 using EmplaceImpl::EmplaceImpl;
243 template <
typename T>
245 this->emplace(std::forward<T>(arg));
246 return static_cast<Derived&
>(*this);
253 template <
typename...
Args>
257 template <
typename...
Args>
261 template <
typename...
Args>
268 return static_cast<Derived&
>(*this);
271 return static_cast<Derived&
>(*this);
274 return static_cast<Derived&
>(*this);
286 template <
typename Args, std::size_t... I>
288 this->emplace(get_emplace_arg<I>(args)...);
289 return static_cast<Derived&
>(*this);
291 template <
typename Args, std::size_t... I>
293 this->emplace(get_emplace_arg<I>(args)...);
294 return static_cast<Derived&
>(*this);
296 template <
typename Args, std::size_t... I>
298 this->emplace(get_emplace_arg<I>(
std::move(args))...);
299 return static_cast<Derived&
>(*this);
310 template <
typename Derived,
typename EmplaceImpl>
318 using Base::operator=;
324 template <
typename...
Args>
328 template <
typename...
Args>
332 template <
typename...
Args>
334 return this->unpackAndEmplace(
342 template <
typename...
Args>
346 template <
typename...
Args>
350 template <
typename...
Args>
352 return this->unpackAndEmplace(
375 template <
typename>
class EmplaceImplT,
377 bool implicit_unpack>
380 emplace_iterator_impl<EmplaceImplT, Container, implicit_unpack>,
381 EmplaceImplT<Container>,
386 EmplaceImplT<Container>,
391 using Base::operator=;
395 emplace_iterator_impl(
const emplace_iterator_impl&) =
default;
397 emplace_iterator_impl& operator=(emplace_iterator_impl&) = default;
398 emplace_iterator_impl& operator=(
const emplace_iterator_impl&) = default;
399 emplace_iterator_impl& operator=(emplace_iterator_impl&&)
noexcept = default;
407 template <typename Container,
bool implicit_unpack = true>
415 template <typename Container,
bool implicit_unpack = true>
423 template <typename Container,
bool implicit_unpack = true>
431 template <typename Container,
bool implicit_unpack = true>
444 template <
bool implicit_unpack = true, typename Container>
447 typename Container::iterator
i) {
460 template <
bool implicit_unpack = true,
typename Container>
463 typename Container::iterator
i) {
476 template <
bool implicit_unpack = true,
typename Container>
491 template <
bool implicit_unpack = true,
typename Container>
make_index_sequence< sizeof...(T)> index_sequence_for
Derived & operator=(const emplace_args< Args... > &args)
emplace_iterator< Container, implicit_unpack > emplacer(Container &c, typename Container::iterator i)
Derived & unpackAndEmplace(Args &&args, index_sequence< I... >)
Derived & operator=(T &&arg)
void emplace(Args &&...args)
front_emplace_iterator< Container, implicit_unpack > front_emplacer(Container &c)
Derived & operator=(emplace_args< Args... > &args)
EmplaceHint(Container &c, typename Container::iterator i)
decltype(auto) unwrap_emplace_arg(folly::rvalue_reference_wrapper< Arg > arg) noexcept
constexpr detail::Map< Move > move
back_emplace_iterator< Container, implicit_unpack > back_emplacer(Container &c)
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
Derived & unpackAndEmplace(const Args &args, index_sequence< I... >)
hint_emplace_iterator< Container, implicit_unpack > hint_emplacer(Container &c, typename Container::iterator i)
std::output_iterator_tag iterator_category
Derived & operator=(const std::tuple< Args... > &args)
EmplaceFront(Container &c)
std::tuple< std::decay_t< Args >... > storage_type
Derived & operator=(const std::pair< Args... > &args)
decltype(auto) get_emplace_arg(emplace_args< Args... > &&args) noexcept
decltype(auto) unwrap_emplace_arg(Arg &&arg) noexcept
void emplace(Args &&...args)
AtomicCounter< T, DeterministicAtomic > Base
emplace_args< Args... > make_emplace_args(Args &&...args) noexcept(noexcept(emplace_args< Args... >(std::forward< Args >(args)...)))
Derived & operator=(std::pair< Args... > &&args)
Emplace(Container &c, typename Container::iterator i)
Derived & operator=(emplace_args< Args... > &&args)
void emplace(Args &&...args)
Derived & operator++(int)
EmplaceBack(Container &c)
Derived & operator=(std::tuple< Args... > &args)
void emplace(Args &&...args)
std::remove_reference_t< decltype(*EmplaceImpl::container)> container_type
Derived & unpackAndEmplace(Args &args, index_sequence< I... >)
Derived & operator=(std::tuple< Args... > &&args)
Derived & operator=(std::pair< Args... > &args)