summaryrefslogtreecommitdiff
path: root/lib/dbTypes.cpp
blob: c848045f41f12becda9b1800d7d4a04aa177b6a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "dbTypes.h"
#include <iostream> // Required else this write::operator() is always recursive

namespace std {
	struct write {
		template<typename T>
		std::ostream &
		operator()(const T & v) const
		{
			return strm << v;
		}
		std::ostream & strm;
	};

	std::ostream &
	operator<<(std::ostream & strm, const MyGrate::DbValueV & v)
	{
		return std::visit(write {strm}, v);
	}
}