#ifndef LLVM_ADT_ADL_H
#define LLVM_ADT_ADL_H
#include <type_traits>
#include <iterator>
#include <utility>
namespace llvm {
template <typename T, T> struct SameType;
namespace adl_detail {
begin;
template <typename RangeT>
constexpr auto begin_impl(RangeT &&range)
-> decltype(begin(std::forward<RangeT>(range))) { … }
end;
template <typename RangeT>
constexpr auto end_impl(RangeT &&range)
-> decltype(end(std::forward<RangeT>(range))) { … }
rbegin;
template <typename RangeT>
constexpr auto rbegin_impl(RangeT &&range)
-> decltype(rbegin(std::forward<RangeT>(range))) { … }
rend;
template <typename RangeT>
constexpr auto rend_impl(RangeT &&range)
-> decltype(rend(std::forward<RangeT>(range))) { … }
swap;
template <typename T>
constexpr void swap_impl(T &&lhs,
T &&rhs) noexcept(noexcept(swap(std::declval<T>(),
std::declval<T>()))) { … }
size;
template <typename RangeT>
constexpr auto size_impl(RangeT &&range)
-> decltype(size(std::forward<RangeT>(range))) { … }
}
template <typename RangeT>
constexpr auto adl_begin(RangeT &&range)
-> decltype(adl_detail::begin_impl(std::forward<RangeT>(range))) { … }
template <typename RangeT>
constexpr auto adl_end(RangeT &&range)
-> decltype(adl_detail::end_impl(std::forward<RangeT>(range))) { … }
template <typename RangeT>
constexpr auto adl_rbegin(RangeT &&range)
-> decltype(adl_detail::rbegin_impl(std::forward<RangeT>(range))) { … }
template <typename RangeT>
constexpr auto adl_rend(RangeT &&range)
-> decltype(adl_detail::rend_impl(std::forward<RangeT>(range))) { … }
template <typename T>
constexpr void adl_swap(T &&lhs, T &&rhs) noexcept(
noexcept(adl_detail::swap_impl(std::declval<T>(), std::declval<T>()))) { … }
template <typename RangeT>
constexpr auto adl_size(RangeT &&range)
-> decltype(adl_detail::size_impl(std::forward<RangeT>(range))) { … }
namespace detail {
IterOfRange;
ValueOfRange;
}
}
#endif