boost_has_vc_iterator.ipp 907 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // (C) Copyright John Maddock 2001.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/config for most recent version.
  6. // MACRO: BOOST_MSVC_STD_ITERATOR
  7. // TITLE: microsoft's version of std::iterator
  8. // DESCRIPTION: Microsoft's broken version of std::iterator
  9. // is being used.
  10. #include <iterator>
  11. namespace boost_msvc_std_iterator{
  12. int test()
  13. {
  14. typedef std::iterator<
  15. std::random_access_iterator_tag,
  16. int
  17. > iterator_type_2;
  18. typedef std::reverse_iterator<const char*, const char> r_it;
  19. iterator_type_2::value_type v2 = 0;
  20. iterator_type_2::iterator_category cat2;
  21. //
  22. // suppress some warnings:
  23. //
  24. (void)v2;
  25. (void)cat2;
  26. return 0;
  27. }
  28. }