libdnspacket icon indicating copy to clipboard operation
libdnspacket copied to clipboard

`std::optional` instead of `std::tuple`

Open MLIOSBond opened this issue 3 years ago • 1 comments

I assume that this library is based on C++17 (by using std::variant) — so wouldn't it be better to replace std::tuple with std::optional in the Parse function?

Suggestion:

std::optional<DnsMessage> Parse(const uint8_t *buf, size_t bufSize)

What do you think?

MLIOSBond avatar Jun 25 '22 18:06 MLIOSBond

I think so

JayBluem avatar Sep 05 '22 08:09 JayBluem