From: Otto Moerbeek Date: Mon, 24 Oct 2022 09:48:17 +0000 (+0200) Subject: Implement output operator for QTypes. X-Git-Tag: dnsdist-1.8.0-rc1~248^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da19e4feb842464659536076b47047b2910c73fb;p=thirdparty%2Fpdns.git 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. --- 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();