1 // Copyright (C) 2017 Michel Morin. 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 <vector> 8 #include <boost/array.hpp> 9 #include <boost/iterator/advance.hpp> 10 #include <boost/iterator/distance.hpp> 11 main()12int main() 13 { 14 // Test that boost::advance/distance are not found by ADL. 15 // (https://github.com/boostorg/iterator/issues/43) 16 17 typedef boost::array<int, 1> boost_type; 18 std::vector<boost_type> std_boost(2); 19 std::vector<boost_type>::iterator it = std_boost.begin(); 20 21 advance(it, 2); 22 (void)distance(it, it); 23 24 return 0; 25 } 26