]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Implement output operator for QTypes.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 24 Oct 2022 09:48:17 +0000 (11:48 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 24 Oct 2022 09:48:17 +0000 (11:48 +0200)
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

index 795b295c23711f64f68cb3b098c5436a4b911462..f314da124da2f1398b00ad960746e3e6e77d24b7 100644 (file)
@@ -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();