fail_criterator.cpp 902 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2002 The Trustees of Indiana University.
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // Boost.MultiArray Library
  6. // Authors: Ronald Garcia
  7. // Jeremy Siek
  8. // Andrew Lumsdaine
  9. // See http://www.boost.org/libs/multi_array for documentation.
  10. //
  11. // fail_criterator.cpp
  12. // const_reverse_iterator/reverse_iterator conversion test
  13. //
  14. #include <boost/multi_array.hpp>
  15. #include <boost/core/lightweight_test.hpp>
  16. int main() {
  17. typedef boost::multi_array<int,3> array;
  18. typedef array::reverse_iterator riterator1;
  19. typedef array::const_reverse_iterator criterator1;
  20. // ILLEGAL conversion from const_reverse_iterator to reverse_iterator
  21. riterator1 in = criterator1();
  22. return boost::report_errors();
  23. }