proxygen
Foreach-inl.h File Reference
#include <cassert>
#include <cstdint>
#include <initializer_list>
#include <iterator>
#include <tuple>
#include <type_traits>
#include <utility>
#include <folly/Portability.h>
#include <folly/Traits.h>
#include <folly/Utility.h>
#include <folly/functional/Invoke.h>

Go to the source code of this file.

Classes

struct  folly::for_each_detail::IsMemberGetFound< typename, T >
 
struct  folly::for_each_detail::IsMemberGetFound< EnableIfMemberGetFound< T >, T >
 
struct  folly::for_each_detail::IsTuple< typename, T >
 
struct  folly::for_each_detail::IsTuple< EnableIfTuple< T >, T >
 
struct  folly::for_each_detail::IsRange< typename, T >
 
struct  folly::for_each_detail::IsRange< EnableIfRange< T >, T >
 
struct  folly::for_each_detail::TupleTag
 
struct  folly::for_each_detail::RangeTag
 
struct  folly::for_each_detail::BeginAddTag
 
struct  folly::for_each_detail::IndexingTag
 

Namespaces

 folly
 —— Concurrent Priority Queue Implementation ——
 
 folly::for_each_detail
 
 folly::for_each_detail::adl
 

Typedefs

template<typename T >
using folly::for_each_detail::EnableIfMemberGetFound = void_t< decltype(std::declval< T >().template get< 0 >())>
 
template<typename Type , typename T = typename std::decay<Type>::type>
using folly::for_each_detail::EnableIfTuple = void_t< decltype(get_impl< 0 >(std::declval< T >())), decltype(std::tuple_size< T >::value)>
 
template<typename Type , typename T = typename std::decay<Type>::type>
using folly::for_each_detail::EnableIfRange = void_t< decltype(adl::adl_begin(std::declval< T >())), decltype(adl::adl_end(std::declval< T >()))>
 
template<typename Sequence >
using folly::for_each_detail::SequenceTag = std::conditional_t< IsRange< void, Sequence >::value, RangeTag, TupleTag >
 
template<typename Func , typename Item , typename Iter >
using folly::for_each_detail::ForEachImplTag = std::conditional_t< is_invocable< Func, Item, index_constant< 0 >, Iter >::value, index_constant< 3 >, std::conditional_t< is_invocable< Func, Item, index_constant< 0 >>::value, index_constant< 2 >, std::conditional_t< is_invocable< Func, Item >::value, index_constant< 1 >, void >>>
 

Functions

template<std::size_t Index, typename Type >
auto folly::for_each_detail::adl::adl_get (Type &&instance) -> decltype(get< Index >(std::declval< Type >()))
 
template<typename Type >
auto folly::for_each_detail::adl::adl_begin (Type &&instance) -> decltype(begin(instance))
 
template<typename Type >
auto folly::for_each_detail::adl::adl_end (Type &&instance) -> decltype(end(instance))
 
template<std::size_t Index, typename Type , std::enable_if_t<!IsMemberGetFound< void, Type >::value, int > = 0>
auto folly::for_each_detail::get_impl (Type &&instance) -> decltype(adl::adl_get< Index >(static_cast< Type && >(instance)))
 
template<typename Func , typename... Args, std::enable_if_t< is_invocable_r< LoopControl, Func, Args... >::value, int > = 0>
LoopControl folly::for_each_detail::invoke_returning_loop_control (Func &&f, Args &&...a)
 
template<typename Sequence , typename Func >
void folly::for_each_detail::for_each_range_impl (index_constant< 3 >, Sequence &&range, Func &func)
 
template<typename Sequence , typename Func >
void folly::for_each_detail::for_each_range_impl (index_constant< 2 >, Sequence &&range, Func &func)
 
template<typename Sequence , typename Func >
void folly::for_each_detail::for_each_range_impl (index_constant< 1 >, Sequence &&range, Func &func)
 
template<typename Sequence , typename Func , std::size_t... Indices>
void folly::for_each_detail::for_each_tuple_impl (index_sequence< Indices... >, Sequence &&seq, Func &func)
 
template<typename Sequence , typename Func >
void folly::for_each_detail::for_each_tuple_impl (index_constant< 2 >, Sequence &&seq, Func &func)
 
template<typename Sequence , typename Func >
void folly::for_each_detail::for_each_tuple_impl (index_constant< 1 >, Sequence &&seq, Func &func)
 
template<typename Sequence , typename Func >
static void folly::for_each_detail::for_each_impl (TupleTag, Sequence &&range, Func &func)
 
template<typename Sequence , typename Func >
static void folly::for_each_detail::for_each_impl (RangeTag, Sequence &&range, Func &func)
 
template<typename Sequence , typename Index >
decltype(auto) folly::for_each_detail::fetch_impl (IndexingTag, Sequence &&sequence, Index &&index)
 
template<typename Sequence , typename Index >
decltype(auto) folly::for_each_detail::fetch_impl (BeginAddTag, Sequence &&sequence, Index index)
 
template<typename Sequence , typename Index >
decltype(auto) folly::for_each_detail::fetch_impl (TupleTag, Sequence &&sequence, Index index)
 
template<typename Sequence , typename Index >
decltype(auto) folly::for_each_detail::fetch_impl (RangeTag, Sequence &&sequence, Index &&index)
 
template<typename Sequence , typename Func >
FOLLY_CPP14_CONSTEXPR Func folly::for_each (Sequence &&sequence, Func func)
 
template<typename Sequence , typename Index >
decltype(auto) FOLLY_CPP14_CONSTEXPR folly::fetch (Sequence &&sequence, Index &&index)