using std::mutex;
using lock = std::unique_lock<std::mutex>;
+#include <stdexcept>
+using std::runtime_error;
+
#include <sstream>
using std::ostringstream;
using std::istringstream;
// string manipulation
+template <class A, class B>
+ostream & operator<<(ostream & o, const pair<A,B> & d) {
+ return o << "<" << d.first << "," << d.second << ">";
+}
+
template <class C>
inline typename enable_if<is_const_iterable<C>::value, string>::type
implode(const C & v, string delim=" ") {
return out;
}
+template <class A>
+typename enable_if<is_const_iterable<A>::value && !is_same<A,string>::value, ostream>::type &
+operator<<(ostream & o, const A & a) {
+ return o << "[" << implode(a, ", ") << "]";
+}
+
#include "verify.h"
#include "threaded_log.h"