@@ -11,10 +11,10 @@ using namespace std;
11
11
#define debug (...) \
12
12
{ \
13
13
_print_header (__FILE__, __LINE__, __FUNCTION__); \
14
- string _s = #__VA_ARGS__; \
15
- replace (_s.begin (), _s.end (), ' ,' , ' ' ); \
16
- stringstream _ss (_s); \
17
- istream_iterator<string> _it (_ss); \
14
+ string _s = #__VA_ARGS__; \
15
+ replace (_s.begin (), _s.end (), ' ,' , ' ' ); \
16
+ stringstream _ss (_s); \
17
+ istream_iterator<string> _it (_ss); \
18
18
_print_value (_it, __VA_ARGS__); \
19
19
}
20
20
@@ -84,8 +84,7 @@ template <class T>
84
84
struct is_supports_top <priority_queue<T>> : true_type {};
85
85
86
86
template <class T >
87
- struct is_supports_top <priority_queue<T, vector<T>, greater<T>>>
88
- : true_type {};
87
+ struct is_supports_top <priority_queue<T, vector<T>, greater<T>>> : true_type {};
89
88
90
89
template <class T >
91
90
struct is_implemented {
@@ -108,8 +107,7 @@ string to_string(const char *s) { return to_string((string)s); }
108
107
string to_string (bool b) { return (b ? " true" : " false" ); }
109
108
110
109
template <class T >
111
- typename enable_if<filter::is_iterable<T>::value, string>::type
112
- to_string (T v) {
110
+ typename enable_if<filter::is_iterable<T>::value, string>::type to_string (T v) {
113
111
bool first = true ;
114
112
string res = CONTAINER + " { " ;
115
113
for (auto &x : v) {
@@ -121,9 +119,7 @@ to_string(T v) {
121
119
}
122
120
123
121
template <class T >
124
- typename enable_if<filter::is_map<T>::value, string>::type to_string (
125
- T m
126
- ) {
122
+ typename enable_if<filter::is_map<T>::value, string>::type to_string (T m) {
127
123
bool first = true ;
128
124
string res = CONTAINER + " { " ;
129
125
for (auto &[k, v] : m) {
@@ -136,8 +132,9 @@ typename enable_if<filter::is_map<T>::value, string>::type to_string(
136
132
}
137
133
138
134
template <class T >
139
- typename enable_if<filter::is_supports_top<T>::value, string>::type
140
- to_string (T v) {
135
+ typename enable_if<filter::is_supports_top<T>::value, string>::type to_string (
136
+ T v
137
+ ) {
141
138
T t = v;
142
139
bool first = true ;
143
140
string res = CONTAINER + " { " ;
@@ -188,8 +185,9 @@ string to_string(tuple<T...> t) {
188
185
}
189
186
190
187
template <class T >
191
- typename enable_if<!filter::is_implemented<T>::value, string>::type
192
- to_string (T x) {
188
+ typename enable_if<!filter::is_implemented<T>::value, string>::type to_string (
189
+ T x
190
+ ) {
193
191
return ERROR + " Not implemented" + RESET;
194
192
}
195
193
@@ -200,7 +198,7 @@ string _to_str(T x) {
200
198
201
199
void _print_header (string file, int line, string func) {
202
200
cerr << HEADER << " [" << file << " :" << line
203
- << (func == " main" ? " " : " - " + func) << " ]" << RESET << " \n " ;
201
+ << (func == " main" ? " " : " - " + func) << " ]" << RESET << " \n " ;
204
202
}
205
203
206
204
void _print_value (istream_iterator<string> it) {}
0 commit comments