1 // Copyright (C) 2018 Andrey Semashev 2 // 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 7 #include <boost/range/distance.hpp> 8 #include <boost/range/iterator_range_core.hpp> 9 #include <boost/iterator/distance.hpp> 10 main()11int main() 12 { 13 // Test that boost::distance from Boost.Range works with boost::distance from Boost.Iterator 14 // (https://github.com/boostorg/iterator/commit/b844c8df530c474ec1856870b9b0de5f487b84d4#commitcomment-30603668) 15 16 typedef boost::iterator_range<const char*> range_type; 17 range_type range; 18 19 (void)boost::distance(range); 20 21 return 0; 22 } 23