12 #ifndef GAUDIKERNEL_SERIALIZESTL_H_ 13 #define GAUDIKERNEL_SERIALIZESTL_H_ 35 return os << std::forward<T>( t );
39 template <
typename Stream,
typename Iterator,
typename Separator,
typename OutputElement = IdentityOutputter>
41 OutputElement
output = OutputElement{} )
43 if ( first != last ) {
47 for ( ; first != last; ++first ) {
48 output( os << sep, *first );
53 template <
typename Stream,
typename Container,
typename Separator,
typename OutputElement = IdentityOutputter>
61 template <
class T,
class ALLOC>
62 inline std::ostream& operator<<( std::ostream& s, const std::vector<T, ALLOC>& v )
68 template <
class T, std::
size_t N>
69 inline std::ostream& operator<<( std::ostream& s, const std::array<T, N>& v )
75 template <
class T,
class ALLOC>
76 inline std::ostream& operator<<( std::ostream& s, const std::list<T, ALLOC>&
l )
82 template <
class T1,
class T2>
83 inline std::ostream& operator<<( std::ostream& s, const std::pair<T1, T2>& p )
85 return s <<
'(' << p.first <<
", " << p.second <<
')';
89 template <
class T1,
class T2,
class COMP,
class ALLOC>
90 inline std::ostream& operator<<( std::ostream& s, const std::map<T1, T2, COMP, ALLOC>&
m )
94 return os << p.first <<
": " << p.second;
100 template <
class K,
class T,
class M>
101 inline std::ostream& operator<<( std::ostream& s, const GaudiUtils::Map<K, T, M>&
m )
104 return s << static_cast<const M&>(
m );
110 template <
class K,
class T,
class H,
class M>
111 inline std::ostream& operator<<( std::ostream& s, const GaudiUtils::HashMap<K, T, H, M>&
m )
114 return s << GaudiUtils::Map<K, T>(
m.begin(),
m.end() );
Stream & ostream_joiner(Stream &os, Iterator first, Iterator last, Separator sep, OutputElement output=OutputElement{})
boost::spirit::classic::position_iterator2< ForwardIterator > Iterator
Forward declarations for the functions in SerializeSTL.h.
std::ostream & operator()(std::ostream &os, T &&t) const