From: Francis Deslauriers Date: Wed, 1 Jun 2022 13:27:57 +0000 (-0400) Subject: cpp-common/bt2: field.hpp: Add assignment operator for Enum field X-Git-Url: https://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=a44a99385cbaf7b78dc7cdb677bed05ae9bdc52e 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 --- 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 {