From da19e4feb842464659536076b47047b2910c73fb Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 24 Oct 2022 11:48:17 +0200 Subject: [PATCH] Implement output operator for QTypes. This fixes #12089 The theory says there should be no unwanted side effects, but I'd like that to be validated independently. --- pdns/qtype.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pdns/qtype.hh b/pdns/qtype.hh index 795b295c23..f314da124d 100644 --- a/pdns/qtype.hh +++ b/pdns/qtype.hh @@ -150,6 +150,11 @@ namespace std { }; } +inline std::ostream& operator<<(std::ostream& stream, QType qtype) +{ + return stream << qtype.toString(); +} + // Used by e.g. boost multi-index inline size_t hash_value(const QType qtype) { return qtype.getCode(); -- 2.47.2