diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index ac694e1..2a0eea0 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -59,4 +59,7 @@ test-suite iterator [ run next_prior_test.cpp ] [ run advance_test.cpp ] [ run distance_test.cpp ] + [ compile adl_test.cpp ] + + [ run shared_iterator_test.cpp ] ; diff --git a/test/adl_test.cpp b/test/adl_test.cpp new file mode 100644 index 0000000..5d5f699 --- /dev/null +++ b/test/adl_test.cpp @@ -0,0 +1,25 @@ +// Copyright (C) 2017 Michel Morin. +// +// Distributed under 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) + +#include +#include +#include +#include + +int main() +{ + // Test that boost::advance/distance are not found by ADL. + // (https://github.com/boostorg/iterator/issues/43) + + typedef boost::array boost_type; + std::vector std_boost(2); + std::vector::iterator it = std_boost.begin(); + + advance(it, 2); + (void)distance(it, it); + + return 0; +}