mirror of
https://github.com/boostorg/iterator.git
synced 2026-01-20 04:32:41 +00:00
Compare commits
6 Commits
boost-1.74
...
boost-1.77
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72a7fb1b73 | ||
|
|
f4b47fd266 | ||
|
|
2c0145bff0 | ||
|
|
987151dde6 | ||
|
|
8e457e716b | ||
|
|
32f4f4d086 |
@@ -3,12 +3,9 @@
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
# Partial (add_subdirectory only) and experimental CMake support
|
||||
# Subject to change; please do not rely on the contents of this file yet.
|
||||
cmake_minimum_required(VERSION 3.5...3.20)
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(BoostIterator LANGUAGES CXX)
|
||||
project(boost_iterator VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_iterator INTERFACE)
|
||||
add_library(Boost::iterator ALIAS boost_iterator)
|
||||
|
||||
@@ -14,5 +14,6 @@
|
||||
"David Abrahams <dave -at- boost-consulting.com>",
|
||||
"Thomas Witt <witt - at - acm.org>",
|
||||
"Jeffrey Lee Hellrung Jr. <jeffrey.hellrung -at- gmail.com>"
|
||||
]
|
||||
],
|
||||
"cxxstd": "03"
|
||||
}
|
||||
|
||||
@@ -157,7 +157,8 @@ input_iterator_test<std::istream_iterator<int>, int, std::ptrdiff_t, int*, int&,
|
||||
// Note: gcc 10.1 defines __cplusplus to a value less than 202002L, but greater than 201703L in C++20 mode.
|
||||
#if __cplusplus > 201703L && (\
|
||||
(defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION >= 100100) \
|
||||
)
|
||||
) || \
|
||||
defined(_MSVC_LANG) && _MSVC_LANG > 201703L && _MSVC_STL_UPDATE >= 202010L
|
||||
#define BOOST_ITERATOR_CXX20_OSTREAM_ITERATOR
|
||||
#endif
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/test/minimal.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
#include <boost/iterator/permutation_iterator.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
@@ -59,14 +59,14 @@ void permutation_test()
|
||||
permutation_type it = begin;
|
||||
permutation_type end = boost::make_permutation_iterator( elements.begin(), indices.end() );
|
||||
|
||||
BOOST_CHECK( it == begin );
|
||||
BOOST_CHECK( it != end );
|
||||
BOOST_TEST( it == begin );
|
||||
BOOST_TEST( it != end );
|
||||
|
||||
BOOST_CHECK( std::distance( begin, end ) == index_size );
|
||||
BOOST_TEST( std::distance( begin, end ) == index_size );
|
||||
|
||||
for( index_type::iterator i_it1 = indices.begin(); it != end; ++i_it1, ++it )
|
||||
{
|
||||
BOOST_CHECK( *it == elements[ *i_it1 ] );
|
||||
BOOST_TEST( *it == elements[ *i_it1 ] );
|
||||
}
|
||||
|
||||
it = begin;
|
||||
@@ -74,14 +74,14 @@ void permutation_test()
|
||||
{
|
||||
index_type::iterator i_it2 = indices.begin();
|
||||
std::advance( i_it2, i1 );
|
||||
BOOST_CHECK( *it == elements[ *i_it2 ] );
|
||||
BOOST_TEST( *it == elements[ *i_it2 ] );
|
||||
}
|
||||
|
||||
it = begin;
|
||||
std::advance(it, index_size);
|
||||
for( index_type::iterator i_it3 = indices.end(); it != begin; )
|
||||
{
|
||||
BOOST_CHECK( *--it == elements[ *--i_it3 ] );
|
||||
BOOST_TEST( *--it == elements[ *--i_it3 ] );
|
||||
}
|
||||
|
||||
it = begin;
|
||||
@@ -90,14 +90,14 @@ void permutation_test()
|
||||
{
|
||||
index_type::iterator i_it4 = --indices.end();
|
||||
std::advance( i_it4, -i2 );
|
||||
BOOST_CHECK( *--it == elements[ *i_it4 ] );
|
||||
BOOST_TEST( *--it == elements[ *i_it4 ] );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int test_main(int, char *[])
|
||||
int main()
|
||||
{
|
||||
permutation_test();
|
||||
return 0;
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user