From a44a99385cbaf7b78dc7cdb677bed05ae9bdc52e Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Wed, 1 Jun 2022 09:27:57 -0400 Subject: [PATCH] cpp-common/bt2: field.hpp: Add assignment operator for Enum field Used to set the value of enumeration fields using integers. Signed-off-by: Francis Deslauriers Change-Id: Iaec161ca8e9e0d13770ac4f82a9c5556a1a20001 Reviewed-on: https://review.lttng.org/c/babeltrace/+/8199 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/10834 Tested-by: jenkins CI-Build: Philippe Proulx --- src/cpp-common/bt2/field.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cpp-common/bt2/field.hpp b/src/cpp-common/bt2/field.hpp index 0be30741..4b385382 100644 --- a/src/cpp-common/bt2/field.hpp +++ b/src/cpp-common/bt2/field.hpp @@ -649,6 +649,8 @@ public: internal::CommonFieldSpec::cls(this->libObjPtr())}; } + using CommonUnsignedIntegerField::operator=; + Class cls() noexcept { return Class {internal::CommonFieldSpec::cls(this->libObjPtr())}; @@ -724,6 +726,8 @@ public: return *this; } + using CommonSignedIntegerField::operator=; + ConstSignedEnumerationFieldClass cls() const noexcept { return ConstSignedEnumerationFieldClass { -- 2.34.1