proxygen
folly::for_each_detail::adl Namespace Reference

Functions

template<std::size_t Index, typename Type >
auto adl_get (Type &&instance) -> decltype(get< Index >(std::declval< Type >()))
 
template<typename Type >
auto adl_begin (Type &&instance) -> decltype(begin(instance))
 
template<typename Type >
auto adl_end (Type &&instance) -> decltype(end(instance))
 

Function Documentation

template<typename Type >
auto folly::for_each_detail::adl::adl_begin ( Type &&  instance) -> decltype(begin(instance))

Definition at line 54 of file Foreach-inl.h.

References folly::test::begin().

Referenced by folly::for_each_detail::fetch_impl(), folly::for_each_detail::for_each_impl(), and folly::for_each_detail::for_each_range_impl().

54  {
55  return begin(instance);
56 }
auto begin(TestAdlIterable &instance)
Definition: ForeachTest.cpp:56
template<typename Type >
auto folly::for_each_detail::adl::adl_end ( Type &&  instance) -> decltype(end(instance))

Definition at line 58 of file Foreach-inl.h.

References folly::test::end().

Referenced by folly::for_each_detail::for_each_range_impl().

58  {
59  return end(instance);
60 }
auto end(TestAdlIterable &instance)
Definition: ForeachTest.cpp:62
template<std::size_t Index, typename Type >
auto folly::for_each_detail::adl::adl_get ( Type &&  instance) -> decltype(get<Index>(std::declval<Type>()))

The adl_ functions below lookup the function name in the namespace of the type of the object being passed into the function. If no function with that name exists for the passed object then the default std:: versions are going to be called

Definition at line 50 of file Foreach-inl.h.

50  {
51  return get<Index>(std::forward<Type>(instance));
52 }