1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00
Sprout/testspr/print.hpp

32 lines
777 B
C++
Raw Normal View History

2011-12-23 11:59:33 +00:00
#ifndef TESTSPR_PRINT_HPP
#define TESTSPR_PRINT_HPP
#include <algorithm>
#include <iterator>
#include <iostream>
#include <sprout/fixed_container.hpp>
namespace testspr {
//
// print
//
template<typename Iterator>
void print(Iterator first, Iterator last) {
std::for_each(first, last, [](typename std::iterator_traits<Iterator>::value_type const& e){ std::cout << e << ' '; });
std::cout << std::endl;
}
template<typename Range>
void print(Range const& range) {
print(sprout::begin(range), sprout::end(range));
}
//
// print_hl
//
void print_hl() {
std::cout << "--------------------------------------------------------------------------------" << std::endl;
}
} // namespace testspr
#endif // #ifndef TESTSPR_PRINT_HPP