Skip to content
Snippets Groups Projects
Commit cd47f7e4 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

add support for std::array in SerializeSTL

Fixes GAUDI-1159.

See merge request !86
parents 85c99bca 4eafe4df
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@
#include <ostream>
#include <vector>
#include <array>
#include <list>
#include <map>
#include <utility>
......@@ -51,6 +52,13 @@ namespace GaudiUtils {
return detail::ostream_joiner( s << '[', v, ", " ) << ']';
}
/// Serialize an std::array in a python like format. E.g. "[1, 2, 3]".
template <class T, std::size_t N>
inline std::ostream& operator<< ( std::ostream& s, const std::array<T,N>& v )
{
return detail::ostream_joiner( s << '[', v, ", " ) << ']';
}
/// Serialize an std::list in a python like format. E.g. "[1, 2, 3]".
template <class T, class ALLOC>
inline std::ostream& operator<< ( std::ostream& s, const std::list<T,ALLOC>& l )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment