minimum_category.cpp 971 B

12345678910111213141516171819202122
  1. // Copyright Andrey Semashev 2014.
  2. //
  3. // Use, modification and distribution is subject to
  4. // the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #include <boost/iterator/minimum_category.hpp>
  7. #include <boost/core/lightweight_test_trait.hpp>
  8. #include <boost/type_traits/is_same.hpp>
  9. #include <iterator>
  10. using boost::is_same;
  11. using boost::iterators::minimum_category;
  12. int main(int, char*[])
  13. {
  14. BOOST_TEST_TRAIT_TRUE((is_same<minimum_category<std::forward_iterator_tag, std::random_access_iterator_tag>::type, std::forward_iterator_tag>));
  15. BOOST_TEST_TRAIT_TRUE((is_same<minimum_category<std::random_access_iterator_tag, std::forward_iterator_tag>::type, std::forward_iterator_tag>));
  16. BOOST_TEST_TRAIT_TRUE((is_same<minimum_category<std::random_access_iterator_tag, std::random_access_iterator_tag>::type, std::random_access_iterator_tag>));
  17. return boost::report_errors();
  18. }