llvm/lldb/include/lldb/Utility/Iterable.h

//===-- Iterable.h ----------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_UTILITY_ITERABLE_H
#define LLDB_UTILITY_ITERABLE_H

#include <utility>


namespace lldb_private {

template <typename I, typename E> E map_adapter(I &iter) {}

template <typename I, typename E> E vector_adapter(I &iter) {}

template <typename I, typename E> E list_adapter(I &iter) {}

template <typename C, typename E, E (*A)(typename C::const_iterator &)>
class AdaptedConstIterator {};

template <typename C, typename E, E (*A)(typename C::const_iterator &)>
AdaptedConstIterator<C, E, A> operator+(
    typename AdaptedConstIterator<C, E, A>::BackingIterator::difference_type
        offset,
    AdaptedConstIterator<C, E, A> &rhs) {}

template <typename C, typename E, E (*A)(typename C::const_iterator &)>
typename AdaptedConstIterator<C, E, A>::BackingIterator::difference_type
operator-(AdaptedConstIterator<C, E, A> &lhs,
          AdaptedConstIterator<C, E, A> &rhs) {}

template <typename C, typename E, E (*A)(typename C::const_iterator &)>
void swap(AdaptedConstIterator<C, E, A> &lhs,
          AdaptedConstIterator<C, E, A> &rhs) {}

template <typename C, typename E, E (*A)(typename C::const_iterator &)>
class AdaptedIterable {};

template <typename C, typename E, E (*A)(typename C::const_iterator &),
          typename MutexType>
class LockingAdaptedIterable : public AdaptedIterable<C, E, A> {};

} // namespace lldb_private

#endif // LLDB_UTILITY_ITERABLE_H