OstreamPolicy.h
Go to the documentation of this file.
1 #ifndef _utl_OstreamPolicy_h_
2 #define _utl_OstreamPolicy_h_
3 
4 #include <iostream>
5 #include <string> // No standard header for forwarding of char_traits.
6 
7 
8 namespace utl {
9 
27  template<
28  typename RetType = int,
29  RetType RetValue = 0,
30  std::ostream& Ostream = std::cerr
31  >
32  struct OstreamPolicy {
33  static RetType Handle(const std::string& message) {
34  Ostream << message << std::endl;
35  return RetValue;
36  }
37  };
38 
39 }
40 
41 
42 #endif
Ouputs via the given std::ostream reference.
Definition: OstreamPolicy.h:32
static RetType Handle(const std::string &message)
Definition: OstreamPolicy.h:33

, generated on Tue Sep 26 2023.