LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
separator.hh
Go to the documentation of this file.
1 
6 #ifndef MISC_SEPARATOR_HH
7 # define MISC_SEPARATOR_HH
8 
9 # include <iosfwd>
10 
11 namespace misc
12 {
13 
14  template <class C, typename S>
15  class separator
16  {
17  public:
18  separator(const C& c, const S& s);
19  std::ostream& operator()(std::ostream& o) const;
20  private:
21  const C& container_;
22  const S& separator_;
23  };
24 
26  template <class C, typename S>
28  separate(const C& c, const S& s);
29 
31  template <class C>
33  separate(const C& c);
34 
36  template <class C, typename S>
37  inline std::ostream&
38  operator<<(std::ostream& ostr, const separator<C, S>& s);
39 
40 }
41 
42 # include <misc/separator.hxx>
43 
44 #endif // !MISC_SEPARATOR_HH