#ifndef MYGRATE_STREAM_SUPPORT_H #define MYGRATE_STREAM_SUPPORT_H #include "mariadb_repl.h" #include #include #include #include #include #include #include namespace MyGrate { class BitSet; struct Date; struct DateTime; struct Time; } struct timespec; struct tm; namespace std { std::ostream & operator<<(std::ostream & strm, const std::byte byt); std::ostream & operator<<(std::ostream & s, const MARIADB_STRING & str); std::ostream & operator<<(std::ostream & s, const tm & tm); std::ostream & operator<<(std::ostream & s, const timespec & ts); std::ostream & operator<<(std::ostream & s, const MyGrate::Date & d); std::ostream & operator<<(std::ostream & s, const MyGrate::Time & t); std::ostream & operator<<(std::ostream & s, const MyGrate::DateTime & dt); std::ostream & operator<<(std::ostream & s, const MyGrate::BitSet & bs); template inline std::ostream & operator<<(std::ostream & strm, const std::pair range) { strm << '['; for (auto i {range.first}; i != range.second; i++) { if (i != range.first) { strm << ','; } strm << *i; } return strm << ']'; } template std::ostream & operator<<(std::ostream & strm, const std::span spn) { return strm << std::make_pair(spn.begin(), spn.end()); } template std::ostream & operator<<(std::ostream & strm, const std::vector & v) { return strm << std::span(v.data(), v.size()); } template std::ostream & operator<<(std::ostream & strm, const std::array & a) { return strm << std::span(a.begin(), a.end()); } } #endif