1 // Copyright (C) 2019 T. Zachary Laine
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 #ifndef BOOST_STL_INTERFACES_VIEW_TESTING_HPP
7 #define BOOST_STL_INTERFACES_VIEW_TESTING_HPP
9 #include <boost/stl_interfaces/view_interface.hpp>
15 boost::stl_interfaces::element_layout Contiguity>
17 : boost::stl_interfaces::
18 view_interface<subrange<Iterator, Sentinel, Contiguity>, Contiguity>
21 constexpr subrange(Iterator it, Sentinel s) : first_(it), last_(s) {}
23 constexpr auto begin() const { return first_; }
24 constexpr auto end() const { return last_; }
32 boost::stl_interfaces::element_layout Contiguity,
35 auto range(Iterator i, Sentinel s)
37 return subrange<Iterator, Sentinel, Contiguity>(i, s);