From 38f2cb2496f1c951ebc8d3695a3eceb732501613 Mon Sep 17 00:00:00 2001 From: Bruno Iljazovic Date: Mon, 19 Feb 2024 11:04:31 +0100 Subject: [PATCH] Add bool conversion operator to subscription_identifiers. Reviewers: ivica Reviewed By: ivica Subscribers: korina Differential Revision: https://repo.mireo.local/D27993 --- include/async_mqtt5/property_types.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/async_mqtt5/property_types.hpp b/include/async_mqtt5/property_types.hpp index 1aa3806..b3745cf 100644 --- a/include/async_mqtt5/property_types.hpp +++ b/include/async_mqtt5/property_types.hpp @@ -54,6 +54,10 @@ public: return !empty(); } + explicit operator bool() const noexcept { + return !empty(); + } + int32_t& operator*() noexcept { return front(); }