reversed_concept3.cpp 704 B

1234567891011121314151617181920212223
  1. // Boost.Range library
  2. //
  3. // Copyright Neil Groves 2014. Use, modification and distribution is subject
  4. // to the Boost Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // For more information, see http://www.boost.org/libs/range
  9. //
  10. #include "mock_range.hpp"
  11. #include <boost/range/adaptor/reversed.hpp>
  12. int main(int, const char**)
  13. {
  14. using boost::range::unit_test::mock_range;
  15. // This next line should fail when Boost.Range concept checking is
  16. // enabled since the adaptor takes at least a BidirectionalRange.
  17. return boost::adaptors::reverse(
  18. mock_range<boost::forward_traversal_tag>()).front();
  19. }