is_convertible_fail.cpp 550 B

12345678910111213141516171819
  1. //
  2. // Copyright (c) Thomas Witt 2002.
  3. //
  4. // Use, modification and distribution is subject to the
  5. // Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. #include <boost/iterator/reverse_iterator.hpp>
  10. #include <boost/cstdlib.hpp>
  11. int main()
  12. {
  13. typedef boost::reverse_iterator<int*> rev_iter1;
  14. typedef boost::reverse_iterator<char*> rev_iter2;
  15. return boost::is_convertible<rev_iter1, rev_iter2>::value
  16. ? boost::exit_failure : boost::exit_success;
  17. }