// Range v3 library
//
// Copyright Eric Niebler 2014-present
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Project home: https://github.com/ericniebler/range-v3
//
#ifndef RANGES_V3_DETAIL_SATISFY_BOOST_RANGE_HPP
#define RANGES_V3_DETAIL_SATISFY_BOOST_RANGE_HPP
#include
#include
#include
#include
#ifndef RANGES_DOXYGEN_INVOKED
namespace boost
{
/// \brief Boost Range specialisation point, for making Boost ranges out of range-v3
/// views
template
struct range_mutable_iterator;
/// \brief Boost Range specialisation point, for making Boost ranges out of range-v3
/// views
template
struct range_const_iterator;
/// \brief Boost Range specialisation point, for making Boost ranges out of range-v3
/// views
template
struct range_value;
/// \brief Boost Range specialisation point, for making Boost ranges out of range-v3
/// views
template
struct range_size;
} // namespace boost
/// \brief Macro specialising Boost Range metafunctions for the specified view
#define RANGES_SATISFY_BOOST_RANGE(view_name) \
namespace boost \
{ \
template \
struct range_mutable_iterator< \
view_name, \
::meta::if_c<(bool)::ranges::common_range>>> \
{ \
using type = ::ranges::iterator_t>; \
}; \
template \
struct range_const_iterator< \
view_name, \
::meta::if_c<(bool)::ranges::common_range const>>> \
{ \
using type = ::ranges::iterator_t const>; \
}; \
template \
struct range_value> \
{ \
using type = ::ranges::range_value_t>; \
}; \
template \
struct range_size> \
: ::meta::if_c<(bool)::ranges::common_range>, \
::meta::defer<::ranges::range_size_t, view_name>, \
::meta::nil_> \
{}; \
template \
struct range_size const> \
: ::meta::if_c<(bool)::ranges::common_range const>, \
::meta::defer<::ranges::range_size_t, view_name const>, \
::meta::nil_> \
{}; \
}
#else
#define RANGES_SATISFY_BOOST_RANGE(view_name)
#endif
#endif