mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-21 08:32:08 +02:00
Merge upstream branch 'develop' into pr/zip_iterator/fusionize
This commit is contained in:
@ -46,5 +46,9 @@ test-suite iterator
|
||||
[ run permutation_iterator_test.cpp : : : # <stlport-iostream>on
|
||||
]
|
||||
[ run function_input_iterator_test.cpp ]
|
||||
|
||||
[ run generator_iterator_test.cpp ]
|
||||
|
||||
[ run minimum_category.cpp ]
|
||||
[ compile-fail minimum_category_compile_fail.cpp ]
|
||||
;
|
||||
|
22
test/minimum_category.cpp
Normal file
22
test/minimum_category.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright Andrey Semashev 2014.
|
||||
//
|
||||
// Use, modification and distribution is subject to
|
||||
// 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 <boost/iterator/minimum_category.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <iterator>
|
||||
|
||||
using boost::is_same;
|
||||
using boost::iterators::minimum_category;
|
||||
|
||||
int main(int, char*[])
|
||||
{
|
||||
BOOST_TEST_TRAIT_TRUE((is_same<minimum_category<std::forward_iterator_tag, std::random_access_iterator_tag>::type, std::forward_iterator_tag>));
|
||||
BOOST_TEST_TRAIT_TRUE((is_same<minimum_category<std::random_access_iterator_tag, std::forward_iterator_tag>::type, std::forward_iterator_tag>));
|
||||
BOOST_TEST_TRAIT_TRUE((is_same<minimum_category<std::random_access_iterator_tag, std::random_access_iterator_tag>::type, std::random_access_iterator_tag>));
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
19
test/minimum_category_compile_fail.cpp
Normal file
19
test/minimum_category_compile_fail.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright Andrey Semashev 2014.
|
||||
//
|
||||
// Use, modification and distribution is subject to
|
||||
// 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 <boost/iterator/minimum_category.hpp>
|
||||
|
||||
using boost::iterators::minimum_category;
|
||||
|
||||
struct A {};
|
||||
struct B {};
|
||||
|
||||
int main(int, char*[])
|
||||
{
|
||||
minimum_category<A, B>::type cat;
|
||||
|
||||
return 0;
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "static_assert_same.hpp"
|
||||
|
||||
#include <boost/iterator/detail/minimum_category.hpp>
|
||||
#include <boost/iterator/minimum_category.hpp>
|
||||
|
||||
struct X { int a; };
|
||||
|
||||
@ -29,7 +29,7 @@ void operator_arrow_test()
|
||||
template <class T, class U, class Min>
|
||||
struct static_assert_min_cat
|
||||
: static_assert_same<
|
||||
typename boost::iterators::detail::minimum_category<T,U>::type, Min
|
||||
typename boost::iterators::minimum_category<T,U>::type, Min
|
||||
>
|
||||
{};
|
||||
|
||||
|
@ -55,13 +55,6 @@
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <stddef.h>
|
||||
|
||||
template <class It>
|
||||
struct pure_traversal
|
||||
: boost::iterators::detail::pure_traversal_tag<
|
||||
typename boost::iterator_traversal<It>::type
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
/// Tests for https://svn.boost.org/trac/boost/ticket/1517
|
||||
int to_value(int const &v)
|
||||
|
Reference in New Issue
Block a user