#pragma once
#include <memory>
#include <tuple>
#include <type_traits>
#include <utility>
#include <folly/Traits.h>
#include <folly/container/Iterator.h>
#include <folly/functional/ApplyTuple.h>
namespace folly {
namespace detail {
template <typename KeyType, typename Alloc>
struct TemporaryEmplaceKey { … };
template <
typename KeyType,
typename MappedType,
typename Func,
typename UsableKeyType,
typename Arg1,
typename Arg2,
std::enable_if_t<
std::is_constructible<
std::pair<KeyType const, MappedType>,
Arg1&&,
Arg2&&>::value,
int> = 0>
auto callWithKeyAndPairArgs(
Func&& f,
UsableKeyType const& key,
std::tuple<Arg1>&& first_args,
std::tuple<Arg2>&& second_args) { … }
template <
typename KeyType,
typename MappedType,
typename Func,
typename UsableKeyType,
typename... Args1,
typename... Args2>
auto callWithKeyAndPairArgs(
Func&& f,
UsableKeyType const& key,
std::tuple<Args1...>&& first_args,
std::tuple<Args2...>&& second_args) { … }
ExactKeyMatchOnly;
template <
typename KeyType,
typename MappedType,
template <typename> class UsableAsKey = ExactKeyMatchOnly,
typename Alloc,
typename Func,
typename Arg1,
typename... Args2,
std::enable_if_t<
std::is_same<remove_cvref_t<Arg1>, KeyType>::value ||
UsableAsKey<remove_cvref_t<Arg1>>::value,
int> = 0>
auto callWithExtractedKey(
Alloc&,
Func&& f,
std::piecewise_construct_t,
std::tuple<Arg1>&& first_args,
std::tuple<Args2...>&& second_args) { … }
template <
typename KeyType,
typename MappedType,
template <typename> class UsableAsKey = ExactKeyMatchOnly,
typename Alloc,
typename Func,
typename... Args1,
typename... Args2>
auto callWithExtractedKey(
Alloc& a,
Func&& f,
std::piecewise_construct_t,
std::tuple<Args1...>&& first_args,
std::tuple<Args2...>&& second_args) { … }
template <
typename KeyType,
typename MappedType,
template <typename> class UsableAsKey = ExactKeyMatchOnly,
typename Alloc,
typename Func>
auto callWithExtractedKey(Alloc& a, Func&& f) { … }
template <
typename KeyType,
typename MappedType,
template <typename> class UsableAsKey = ExactKeyMatchOnly,
typename Alloc,
typename Func,
typename U1,
typename U2>
auto callWithExtractedKey(Alloc& a, Func&& f, U1&& x, U2&& y) { … }
template <
typename KeyType,
typename MappedType,
template <typename> class UsableAsKey = ExactKeyMatchOnly,
typename Alloc,
typename Func,
typename U1,
typename U2>
auto callWithExtractedKey(Alloc& a, Func&& f, std::pair<U1, U2> const& p) { … }
template <
typename KeyType,
typename MappedType,
template <typename> class UsableAsKey = ExactKeyMatchOnly,
typename Alloc,
typename Func,
typename U1,
typename U2>
auto callWithExtractedKey(Alloc& a, Func&& f, std::pair<U1, U2>&& p) { … }
template <
typename KeyType,
template <typename> class UsableAsKey = ExactKeyMatchOnly,
typename Alloc,
typename Func,
typename Arg,
std::enable_if_t<
std::is_same<remove_cvref_t<Arg>, KeyType>::value ||
UsableAsKey<remove_cvref_t<Arg>>::value,
int> = 0>
auto callWithConstructedKey(Alloc&, Func&& f, Arg&& arg) { … }
template <
typename KeyType,
template <typename> class UsableAsKey = ExactKeyMatchOnly,
typename Alloc,
typename Func,
typename... Args>
auto callWithConstructedKey(Alloc& a, Func&& f, Args&&... args) { … }
RequireAllocator;
RequireNotAllocator;
RequireInputIterator;
}
}