From: Otto Moerbeek Date: Mon, 24 Oct 2022 09:48:17 +0000 (+0200) Subject: Implement output operator for QTypes. X-Git-Tag: rec-4.8.0-beta2~1^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=874d107161b16d0bef8241ec45602628d0d466aa;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. (cherry picked from commit da19e4feb842464659536076b47047b2910c73fb) --- 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();