14#ifndef OR_TOOLS_BASE_STL_LOGGING_H_
15#define OR_TOOLS_BASE_STL_LOGGING_H_
25#include "absl/container/flat_hash_map.h"
26#include "absl/container/flat_hash_set.h"
27#include "absl/container/node_hash_map.h"
28#include "absl/container/node_hash_set.h"
33template <
class First,
class Second>
34std::ostream&
operator<<(std::ostream& out,
const std::pair<First, Second>& p);
43#define OUTPUT_TWO_ARG_CONTAINER(Sequence) \
44 template <class T1, class T2> \
45 inline std::ostream& operator<<(std::ostream& out, \
46 const Sequence<T1, T2>& seq) { \
47 google::PrintSequence(out, seq.begin(), seq.end()); \
55#undef OUTPUT_TWO_ARG_CONTAINER
57#define OUTPUT_THREE_ARG_CONTAINER(Sequence) \
58 template <class T1, class T2, class T3> \
59 inline std::ostream& operator<<(std::ostream& out, \
60 const Sequence<T1, T2, T3>& seq) { \
61 google::PrintSequence(out, seq.begin(), seq.end()); \
68#undef OUTPUT_THREE_ARG_CONTAINER
70#define OUTPUT_FOUR_ARG_CONTAINER(Sequence) \
71 template <class T1, class T2, class T3, class T4> \
72 inline std::ostream& operator<<(std::ostream& out, \
73 const Sequence<T1, T2, T3, T4>& seq) { \
74 google::PrintSequence(out, seq.begin(), seq.end()); \
83#undef OUTPUT_FOUR_ARG_CONTAINER
85#define OUTPUT_FIVE_ARG_CONTAINER(Sequence) \
86 template <class T1, class T2, class T3, class T4, class T5> \
87 inline std::ostream& operator<<(std::ostream& out, \
88 const Sequence<T1, T2, T3, T4, T5>& seq) { \
89 google::PrintSequence(out, seq.begin(), seq.end()); \
96#undef OUTPUT_FIVE_ARG_CONTAINER
98template <
class First,
class Second>
100 const std::pair<First, Second>& p) {
101 out <<
'(' << p.first <<
", " << p.second <<
')';
110 for (
int i = 0; begin !=
end && i < 100; ++i, ++begin) {
111 if (i > 0) out <<
' ';
void PrintSequence(std::ostream &out, Iter begin, Iter end)
std::optional< int64_t > end
#define OUTPUT_FOUR_ARG_CONTAINER(Sequence)
#define OUTPUT_TWO_ARG_CONTAINER(Sequence)
std::ostream & operator<<(std::ostream &out, const std::pair< First, Second > &p)
#define OUTPUT_THREE_ARG_CONTAINER(Sequence)
#define OUTPUT_FIVE_ARG_CONTAINER(Sequence)