debugging.hpp 837 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. Copyright (c) Marshall Clow 2010-2012.
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. For more information, see http://www.boost.org
  6. */
  7. #ifndef BOOST_ALGORITHM_SEARCH_DETAIL_DEBUG_HPP
  8. #define BOOST_ALGORITHM_SEARCH_DETAIL_DEBUG_HPP
  9. #include <iostream>
  10. /// \cond DOXYGEN_HIDE
  11. namespace boost { namespace algorithm { namespace detail {
  12. // Debugging support
  13. template <typename Iter>
  14. void PrintTable ( Iter first, Iter last ) {
  15. std::cout << std::distance ( first, last ) << ": { ";
  16. for ( Iter iter = first; iter != last; ++iter )
  17. std::cout << *iter << " ";
  18. std::cout << "}" << std::endl;
  19. }
  20. }}}
  21. /// \endcond
  22. #endif // BOOST_ALGORITHM_SEARCH_DETAIL_DEBUG_HPP