-
-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use this print std::pair or std::map<std::pair, int> ? #70
Comments
You should just have to override the #include "dbg.h"
template<typename T1, typename T2>
std::ostream& operator<<(std::ostream& out, const std::pair<T1, T2>& v) {
out << "{" << v.first << "," << v.second << "}";
return out;
}
int main() {
dbg(std::pair<int, bool>{3, false});
dbg(std::pair<bool, int>{true, 47});
} And by defining the above Does this answer the question? |
I think |
Yes, thanks very much :) |
Could someone help show me an example to print?
I do not find an example in the test. Thanks
The text was updated successfully, but these errors were encountered: