Michele De Stefano's C++ Utilities
print_seq.hpp
1 // print_seq.hpp
2 //
3 // Copyright (c) 2012 - Michele De Stefano (micdestefano@users.sourceforge.net)
4 //
5 // Distributed under the MIT License (See accompanying file LICENSE)
6 
7 #ifndef PRINT_SEQ_HPP_INCLUDED
8 #define PRINT_SEQ_HPP_INCLUDED
9 
10 #include <iostream>
11 #include <algorithm>
12 #include <iterator>
13 
14 template<class InIt>
15 inline void print_seq(InIt b,InIt e) {
16  using namespace std;
17 
18  copy(b,e,
19  ostream_iterator<typename iterator_traits<InIt>::value_type>(cout,","));
20  cout << endl;
21 }
22 
23 #endif