cpp-common: add `bt2s::optional`, alias of `nonstd::optional`
[babeltrace.git] / src / cpp-common / bt2 / field.hpp
index e075f8e609e74eebedeaffa1515ebc20c7fd7865..69bf4ab6d916cc5f8378a397881b67accbe73bd9 100644 (file)
@@ -7,15 +7,18 @@
 #ifndef BABELTRACE_CPP_COMMON_BT2_FIELD_HPP
 #define BABELTRACE_CPP_COMMON_BT2_FIELD_HPP
 
-#include <type_traits>
 #include <cstdint>
+#include <type_traits>
+
 #include <babeltrace2/babeltrace.h>
 
 #include "common/assert.h"
-#include "internal/borrowed-obj.hpp"
-#include "cpp-common/optional.hpp"
-#include "cpp-common/string_view.hpp"
+#include "cpp-common/bt2s/optional.hpp"
+
+#include "borrowed-object.hpp"
 #include "field-class.hpp"
+#include "internal/utils.hpp"
+#include "raw-value-proxy.hpp"
 
 namespace bt2 {
 
@@ -89,46 +92,45 @@ struct CommonFieldSpec<const bt_field> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonField : public internal::BorrowedObj<LibObjT>
+class CommonField : public BorrowedObject<LibObjT>
 {
 private:
-    using typename internal::BorrowedObj<LibObjT>::_ThisBorrowedObj;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
 
 protected:
-    using typename internal::BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ThisCommonField = CommonField<LibObjT>;
 
 public:
-    using Class =
-        typename std::conditional<std::is_const<LibObjT>::value, ConstFieldClass, FieldClass>::type;
+    using Class = internal::DepFc<LibObjT>;
 
-    explicit CommonField(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonField(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonField(const CommonField<OtherLibObjT>& val) noexcept : _ThisBorrowedObj {val}
+    CommonField(const CommonField<OtherLibObjT> val) noexcept : _ThisBorrowedObject {val}
     {
     }
 
     template <typename OtherLibObjT>
-    _ThisCommonField& operator=(const CommonField<OtherLibObjT>& val) noexcept
+    _ThisCommonField operator=(const CommonField<OtherLibObjT> val) noexcept
     {
-        _ThisBorrowedObj::operator=(val);
+        _ThisBorrowedObject::operator=(val);
         return *this;
     }
 
-    FieldClassType classType() const noexcept
+    CommonField<const bt_field> asConst() const noexcept
     {
-        return static_cast<FieldClassType>(bt_field_get_class_type(this->libObjPtr()));
+        return CommonField<const bt_field> {*this};
     }
 
-    ConstFieldClass cls() const noexcept
+    FieldClassType classType() const noexcept
     {
-        return ConstFieldClass {internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return static_cast<FieldClassType>(bt_field_get_class_type(this->libObjPtr()));
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
@@ -203,6 +205,12 @@ public:
         return this->cls().isVariant();
     }
 
+    template <typename FieldT>
+    FieldT as() const noexcept
+    {
+        return FieldT {this->libObjPtr()};
+    }
+
     CommonBoolField<LibObjT> asBool() const noexcept;
     CommonBitArrayField<LibObjT> asBitArray() const noexcept;
     CommonUnsignedIntegerField<LibObjT> asUnsignedInteger() const noexcept;
@@ -222,6 +230,26 @@ public:
 using Field = CommonField<bt_field>;
 using ConstField = CommonField<const bt_field>;
 
+namespace internal {
+
+struct FieldTypeDescr
+{
+    using Const = ConstField;
+    using NonConst = Field;
+};
+
+template <>
+struct TypeDescr<Field> : public FieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstField> : public FieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
 class CommonBoolField final : public CommonField<LibObjT>
 {
@@ -238,39 +266,63 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonBoolField(const CommonBoolField<OtherLibObjT>& val) noexcept : _ThisCommonField {val}
+    CommonBoolField(const CommonBoolField<OtherLibObjT> val) noexcept : _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonBoolField<LibObjT>& operator=(const CommonBoolField<OtherLibObjT>& val) noexcept
+    CommonBoolField<LibObjT> operator=(const CommonBoolField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    CommonBoolField<LibObjT>& operator=(const Value val) noexcept
+    CommonBoolField<const bt_field> asConst() const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        return CommonBoolField<const bt_field> {*this};
+    }
 
-        bt_field_bool_set_value(this->libObjPtr(), static_cast<bt_bool>(val));
-        return *this;
+    RawValueProxy<CommonBoolField> operator*() const noexcept
+    {
+        return RawValueProxy<CommonBoolField> {*this};
     }
 
-    Value value() const noexcept
+    void value(const Value val) const noexcept
     {
-        return static_cast<Value>(bt_field_bool_get_value(this->libObjPtr()));
+        static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstBoolField`.");
+
+        bt_field_bool_set_value(this->libObjPtr(), static_cast<bt_bool>(val));
     }
 
-    operator Value() const noexcept
+    Value value() const noexcept
     {
-        return this->value();
+        return static_cast<Value>(bt_field_bool_get_value(this->libObjPtr()));
     }
 };
 
 using BoolField = CommonBoolField<bt_field>;
 using ConstBoolField = CommonBoolField<const bt_field>;
 
+namespace internal {
+
+struct BoolFieldTypeDescr
+{
+    using Const = ConstBoolField;
+    using NonConst = BoolField;
+};
+
+template <>
+struct TypeDescr<BoolField> : public BoolFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstBoolField> : public BoolFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
 class CommonBitArrayField final : public CommonField<LibObjT>
 {
@@ -279,8 +331,7 @@ private:
     using typename CommonField<LibObjT>::_ThisCommonField;
 
 public:
-    using Class = typename std::conditional<std::is_const<LibObjT>::value, ConstBitArrayFieldClass,
-                                            BitArrayFieldClass>::type;
+    using Class = internal::DepType<LibObjT, BitArrayFieldClass, ConstBitArrayFieldClass>;
 
     explicit CommonBitArrayField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr}
     {
@@ -288,18 +339,23 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonBitArrayField(const CommonBitArrayField<OtherLibObjT>& val) noexcept :
+    CommonBitArrayField(const CommonBitArrayField<OtherLibObjT> val) noexcept :
         _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonBitArrayField<LibObjT>& operator=(const CommonBitArrayField<OtherLibObjT>& val) noexcept
+    CommonBitArrayField<LibObjT> operator=(const CommonBitArrayField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
+    CommonBitArrayField<const bt_field> asConst() const noexcept
+    {
+        return CommonBitArrayField<const bt_field> {*this};
+    }
+
     ConstBitArrayFieldClass cls() const noexcept
     {
         return ConstBitArrayFieldClass {
@@ -311,12 +367,12 @@ public:
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
 
-    CommonBitArrayField<LibObjT>& operator=(const std::uint64_t bits) noexcept
+    void valueAsInteger(const std::uint64_t bits) const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstBitArrayField`.");
 
         bt_field_bit_array_set_value_as_integer(this->libObjPtr(), bits);
-        return *this;
     }
 
     std::uint64_t valueAsInteger() const noexcept
@@ -334,8 +390,28 @@ public:
 using BitArrayField = CommonBitArrayField<bt_field>;
 using ConstBitArrayField = CommonBitArrayField<const bt_field>;
 
+namespace internal {
+
+struct BitArrayFieldTypeDescr
+{
+    using Const = ConstBitArrayField;
+    using NonConst = BitArrayField;
+};
+
+template <>
+struct TypeDescr<BitArrayField> : public BitArrayFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstBitArrayField> : public BitArrayFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
-class CommonUnsignedIntegerField final : public CommonField<LibObjT>
+class CommonUnsignedIntegerField : public CommonField<LibObjT>
 {
 private:
     using typename CommonField<LibObjT>::_ThisCommonField;
@@ -346,9 +422,7 @@ protected:
 
 public:
     using Value = std::uint64_t;
-
-    using Class = typename std::conditional<std::is_const<LibObjT>::value, ConstIntegerFieldClass,
-                                            IntegerFieldClass>::type;
+    using Class = internal::DepType<LibObjT, IntegerFieldClass, ConstIntegerFieldClass>;
 
     explicit CommonUnsignedIntegerField(const _LibObjPtr libObjPtr) noexcept :
         _ThisCommonField {libObjPtr}
@@ -357,54 +431,73 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonUnsignedIntegerField(const CommonUnsignedIntegerField<OtherLibObjT>& val) noexcept :
+    CommonUnsignedIntegerField(const CommonUnsignedIntegerField<OtherLibObjT> val) noexcept :
         _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    _ThisCommonUnsignedIntegerField&
-    operator=(const CommonUnsignedIntegerField<OtherLibObjT>& val) noexcept
+    _ThisCommonUnsignedIntegerField
+    operator=(const CommonUnsignedIntegerField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    ConstIntegerFieldClass cls() const noexcept
+    CommonUnsignedIntegerField<const bt_field> asConst() const noexcept
     {
-        return ConstIntegerFieldClass {
-            internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return CommonUnsignedIntegerField<const bt_field> {*this};
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
 
-    CommonUnsignedIntegerField<LibObjT>& operator=(const Value val) noexcept
+    RawValueProxy<CommonUnsignedIntegerField> operator*() const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        return RawValueProxy<CommonUnsignedIntegerField> {*this};
+    }
+
+    void value(const Value val) const noexcept
+    {
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstUnsignedIntegerField`.");
 
         bt_field_integer_unsigned_set_value(this->libObjPtr(), val);
-        return *this;
     }
 
     Value value() const noexcept
     {
         return bt_field_integer_unsigned_get_value(this->libObjPtr());
     }
-
-    operator Value() const noexcept
-    {
-        return this->value();
-    }
 };
 
 using UnsignedIntegerField = CommonUnsignedIntegerField<bt_field>;
 using ConstUnsignedIntegerField = CommonUnsignedIntegerField<const bt_field>;
 
+namespace internal {
+
+struct UnsignedIntegerFieldTypeDescr
+{
+    using Const = ConstUnsignedIntegerField;
+    using NonConst = UnsignedIntegerField;
+};
+
+template <>
+struct TypeDescr<UnsignedIntegerField> : public UnsignedIntegerFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstUnsignedIntegerField> : public UnsignedIntegerFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
-class CommonSignedIntegerField final : public CommonField<LibObjT>
+class CommonSignedIntegerField : public CommonField<LibObjT>
 {
 private:
     using typename CommonField<LibObjT>::_ThisCommonField;
@@ -414,10 +507,8 @@ protected:
     using _ThisCommonSignedIntegerField = CommonSignedIntegerField<LibObjT>;
 
 public:
-    using Value = std::uint64_t;
-
-    using Class = typename std::conditional<std::is_const<LibObjT>::value, ConstIntegerFieldClass,
-                                            IntegerFieldClass>::type;
+    using Value = std::int64_t;
+    using Class = internal::DepType<LibObjT, IntegerFieldClass, ConstIntegerFieldClass>;
 
     explicit CommonSignedIntegerField(const _LibObjPtr libObjPtr) noexcept :
         _ThisCommonField {libObjPtr}
@@ -426,81 +517,94 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonSignedIntegerField(const CommonSignedIntegerField<OtherLibObjT>& val) noexcept :
+    CommonSignedIntegerField(const CommonSignedIntegerField<OtherLibObjT> val) noexcept :
         _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    _ThisCommonSignedIntegerField&
-    operator=(const CommonSignedIntegerField<OtherLibObjT>& val) noexcept
+    _ThisCommonSignedIntegerField
+    operator=(const CommonSignedIntegerField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    ConstIntegerFieldClass cls() const noexcept
+    CommonSignedIntegerField<const bt_field> asConst() const noexcept
     {
-        return ConstIntegerFieldClass {
-            internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return CommonSignedIntegerField<const bt_field> {*this};
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
 
-    CommonSignedIntegerField<LibObjT>& operator=(const Value val) noexcept
+    RawValueProxy<CommonSignedIntegerField> operator*() const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        return RawValueProxy<CommonSignedIntegerField> {*this};
+    }
+
+    void value(const Value val) const noexcept
+    {
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstSignedIntegerField`.");
 
         bt_field_integer_signed_set_value(this->libObjPtr(), val);
-        return *this;
     }
 
     Value value() const noexcept
     {
         return bt_field_integer_signed_get_value(this->libObjPtr());
     }
-
-    operator Value() const noexcept
-    {
-        return this->value();
-    }
 };
 
 using SignedIntegerField = CommonSignedIntegerField<bt_field>;
 using ConstSignedIntegerField = CommonSignedIntegerField<const bt_field>;
 
+namespace internal {
+
+struct SignedIntegerFieldTypeDescr
+{
+    using Const = ConstSignedIntegerField;
+    using NonConst = SignedIntegerField;
+};
+
+template <>
+struct TypeDescr<SignedIntegerField> : public SignedIntegerFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstSignedIntegerField> : public SignedIntegerFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 class EnumerationFieldClassMappingLabels
 {
 public:
     explicit EnumerationFieldClassMappingLabels(
         const bt_field_class_enumeration_mapping_label_array labels, const std::uint64_t size) :
         _mLabels {labels},
-        _mSize {size}
+        _mLen {size}
     {
     }
 
-    EnumerationFieldClassMappingLabels(const EnumerationFieldClassMappingLabels&) noexcept =
-        default;
-
-    EnumerationFieldClassMappingLabels&
-    operator=(const EnumerationFieldClassMappingLabels&) noexcept = default;
-
-    std::uint64_t size() const noexcept
+    std::uint64_t length() const noexcept
     {
-        return _mSize;
+        return _mLen;
     }
 
-    bpstd::string_view operator[](const std::uint64_t index) const noexcept
+    const char *operator[](const std::uint64_t index) const noexcept
     {
         return _mLabels[index];
     }
 
 private:
     bt_field_class_enumeration_mapping_label_array _mLabels;
-    std::uint64_t _mSize;
+    std::uint64_t _mLen;
 };
 
 template <typename LibObjT>
@@ -511,9 +615,8 @@ private:
     using typename CommonField<LibObjT>::_LibObjPtr;
 
 public:
-    using Class =
-        typename std::conditional<std::is_const<LibObjT>::value, ConstUnsignedEnumerationFieldClass,
-                                  UnsignedEnumerationFieldClass>::type;
+    using Class = internal::DepType<LibObjT, UnsignedEnumerationFieldClass,
+                                    ConstUnsignedEnumerationFieldClass>;
 
     explicit CommonUnsignedEnumerationField(const _LibObjPtr libObjPtr) noexcept :
         _ThisCommonUnsignedIntegerField {libObjPtr}
@@ -522,27 +625,26 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonUnsignedEnumerationField(const CommonUnsignedEnumerationField<OtherLibObjT>& val) noexcept
+    CommonUnsignedEnumerationField(const CommonUnsignedEnumerationField<OtherLibObjT> val) noexcept
         :
         _ThisCommonUnsignedIntegerField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonUnsignedEnumerationField<LibObjT>&
-    operator=(const CommonUnsignedEnumerationField<OtherLibObjT>& val) noexcept
+    CommonUnsignedEnumerationField<LibObjT>
+    operator=(const CommonUnsignedEnumerationField<OtherLibObjT> val) noexcept
     {
         _ThisCommonUnsignedIntegerField::operator=(val);
         return *this;
     }
 
-    ConstUnsignedEnumerationFieldClass cls() const noexcept
+    CommonUnsignedEnumerationField<const bt_field> asConst() const noexcept
     {
-        return ConstUnsignedEnumerationFieldClass {
-            internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return CommonUnsignedEnumerationField<const bt_field> {*this};
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
@@ -555,7 +657,7 @@ public:
                                                                              &labelArray, &count);
 
         if (status == BT_FIELD_ENUMERATION_GET_MAPPING_LABELS_STATUS_MEMORY_ERROR) {
-            throw LibMemoryError {};
+            throw MemoryError {};
         }
 
         return EnumerationFieldClassMappingLabels {labelArray, count};
@@ -565,6 +667,26 @@ public:
 using UnsignedEnumerationField = CommonUnsignedEnumerationField<bt_field>;
 using ConstUnsignedEnumerationField = CommonUnsignedEnumerationField<const bt_field>;
 
+namespace internal {
+
+struct UnsignedEnumerationFieldTypeDescr
+{
+    using Const = ConstUnsignedEnumerationField;
+    using NonConst = UnsignedEnumerationField;
+};
+
+template <>
+struct TypeDescr<UnsignedEnumerationField> : public UnsignedEnumerationFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstUnsignedEnumerationField> : public UnsignedEnumerationFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
 class CommonSignedEnumerationField final : public CommonSignedIntegerField<LibObjT>
 {
@@ -574,8 +696,7 @@ private:
 
 public:
     using Class =
-        typename std::conditional<std::is_const<LibObjT>::value, ConstSignedEnumerationFieldClass,
-                                  SignedEnumerationFieldClass>::type;
+        internal::DepType<LibObjT, SignedEnumerationFieldClass, ConstSignedEnumerationFieldClass>;
 
     explicit CommonSignedEnumerationField(const _LibObjPtr libObjPtr) noexcept :
         _ThisCommonSignedIntegerField {libObjPtr}
@@ -584,26 +705,25 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonSignedEnumerationField(const CommonSignedEnumerationField<OtherLibObjT>& val) noexcept :
+    CommonSignedEnumerationField(const CommonSignedEnumerationField<OtherLibObjT> val) noexcept :
         _ThisCommonSignedIntegerField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonSignedEnumerationField<LibObjT>&
-    operator=(const CommonSignedEnumerationField<OtherLibObjT>& val) noexcept
+    CommonSignedEnumerationField<LibObjT>
+    operator=(const CommonSignedEnumerationField<OtherLibObjT> val) noexcept
     {
         _ThisCommonSignedIntegerField::operator=(val);
         return *this;
     }
 
-    ConstSignedEnumerationFieldClass cls() const noexcept
+    CommonSignedEnumerationField<const bt_field> asConst() const noexcept
     {
-        return ConstSignedEnumerationFieldClass {
-            internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return CommonSignedEnumerationField<const bt_field> {*this};
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
@@ -616,7 +736,7 @@ public:
             bt_field_enumeration_signed_get_mapping_labels(this->libObjPtr(), &labelArray, &count);
 
         if (status == BT_FIELD_ENUMERATION_GET_MAPPING_LABELS_STATUS_MEMORY_ERROR) {
-            throw LibMemoryError {};
+            throw MemoryError {};
         }
 
         return EnumerationFieldClassMappingLabels {labelArray, count};
@@ -626,6 +746,26 @@ public:
 using SignedEnumerationField = CommonSignedEnumerationField<bt_field>;
 using ConstSignedEnumerationField = CommonSignedEnumerationField<const bt_field>;
 
+namespace internal {
+
+struct SignedEnumerationFieldTypeDescr
+{
+    using Const = ConstSignedEnumerationField;
+    using NonConst = SignedEnumerationField;
+};
+
+template <>
+struct TypeDescr<SignedEnumerationField> : public SignedEnumerationFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstSignedEnumerationField> : public SignedEnumerationFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
 class CommonSinglePrecisionRealField final : public CommonField<LibObjT>
 {
@@ -643,42 +783,67 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonSinglePrecisionRealField(const CommonSinglePrecisionRealField<OtherLibObjT>& val) noexcept
+    CommonSinglePrecisionRealField(const CommonSinglePrecisionRealField<OtherLibObjT> val) noexcept
         :
         _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonSinglePrecisionRealField<LibObjT>&
-    operator=(const CommonSinglePrecisionRealField<OtherLibObjT>& val) noexcept
+    CommonSinglePrecisionRealField<LibObjT>
+    operator=(const CommonSinglePrecisionRealField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    CommonSinglePrecisionRealField<LibObjT>& operator=(const Value val) noexcept
+    CommonSinglePrecisionRealField<const bt_field> asConst() const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        return CommonSinglePrecisionRealField<const bt_field> {*this};
+    }
 
-        bt_field_real_single_precision_set_value(this->libObjPtr(), val);
-        return *this;
+    RawValueProxy<CommonSinglePrecisionRealField> operator*() const noexcept
+    {
+        return RawValueProxy<CommonSinglePrecisionRealField> {*this};
     }
 
-    Value value() const noexcept
+    void value(const Value val) const noexcept
     {
-        return bt_field_real_single_precision_get_value(this->libObjPtr());
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstSinglePrecisionRealField`.");
+
+        bt_field_real_single_precision_set_value(this->libObjPtr(), val);
     }
 
-    operator Value() const noexcept
+    Value value() const noexcept
     {
-        return this->value();
+        return bt_field_real_single_precision_get_value(this->libObjPtr());
     }
 };
 
 using SinglePrecisionRealField = CommonSinglePrecisionRealField<bt_field>;
 using ConstSinglePrecisionRealField = CommonSinglePrecisionRealField<const bt_field>;
 
+namespace internal {
+
+struct SinglePrecisionRealFieldTypeDescr
+{
+    using Const = ConstSinglePrecisionRealField;
+    using NonConst = SinglePrecisionRealField;
+};
+
+template <>
+struct TypeDescr<SinglePrecisionRealField> : public SinglePrecisionRealFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstSinglePrecisionRealField> : public SinglePrecisionRealFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
 class CommonDoublePrecisionRealField final : public CommonField<LibObjT>
 {
@@ -696,42 +861,67 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonDoublePrecisionRealField(const CommonDoublePrecisionRealField<OtherLibObjT>& val) noexcept
+    CommonDoublePrecisionRealField(const CommonDoublePrecisionRealField<OtherLibObjT> val) noexcept
         :
         _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonDoublePrecisionRealField<LibObjT>&
-    operator=(const CommonDoublePrecisionRealField<OtherLibObjT>& val) noexcept
+    CommonDoublePrecisionRealField<LibObjT>
+    operator=(const CommonDoublePrecisionRealField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    CommonDoublePrecisionRealField<LibObjT>& operator=(const Value val) noexcept
+    CommonDoublePrecisionRealField<const bt_field> asConst() const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        return CommonDoublePrecisionRealField<const bt_field> {*this};
+    }
 
-        bt_field_real_single_precision_set_value(this->libObjPtr(), val);
-        return *this;
+    RawValueProxy<CommonDoublePrecisionRealField> operator*() const noexcept
+    {
+        return RawValueProxy<CommonDoublePrecisionRealField> {*this};
     }
 
-    Value value() const noexcept
+    void value(const Value val) const noexcept
     {
-        return bt_field_real_single_precision_get_value(this->libObjPtr());
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstDoublePrecisionRealField`.");
+
+        bt_field_real_double_precision_set_value(this->libObjPtr(), val);
     }
 
-    operator Value() const noexcept
+    Value value() const noexcept
     {
-        return this->value();
+        return bt_field_real_double_precision_get_value(this->libObjPtr());
     }
 };
 
 using DoublePrecisionRealField = CommonDoublePrecisionRealField<bt_field>;
 using ConstDoublePrecisionRealField = CommonDoublePrecisionRealField<const bt_field>;
 
+namespace internal {
+
+struct DoublePrecisionRealFieldTypeDescr
+{
+    using Const = ConstDoublePrecisionRealField;
+    using NonConst = DoublePrecisionRealField;
+};
+
+template <>
+struct TypeDescr<DoublePrecisionRealField> : public DoublePrecisionRealFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstDoublePrecisionRealField> : public DoublePrecisionRealFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
 class CommonStringField final : public CommonField<LibObjT>
 {
@@ -740,49 +930,78 @@ private:
     using typename CommonField<LibObjT>::_ThisCommonField;
 
 public:
+    using Value = const char *;
+
     explicit CommonStringField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr}
     {
         BT_ASSERT_DBG(this->isString());
     }
 
     template <typename OtherLibObjT>
-    CommonStringField(const CommonStringField<OtherLibObjT>& val) noexcept : _ThisCommonField {val}
+    CommonStringField(const CommonStringField<OtherLibObjT> val) noexcept : _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonStringField<LibObjT>& operator=(const CommonStringField<OtherLibObjT>& val) noexcept
+    CommonStringField<LibObjT> operator=(const CommonStringField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    CommonStringField<LibObjT>& operator=(const char * const val) noexcept
+    CommonStringField<const bt_field> asConst() const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        return CommonStringField<const bt_field> {*this};
+    }
+
+    RawStringValueProxy<CommonStringField> operator*() const noexcept
+    {
+        return RawStringValueProxy<CommonStringField> {*this};
+    }
+
+    void value(const char * const val) const
+    {
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstStringField`.");
 
         const auto status = bt_field_string_set_value(this->libObjPtr(), val);
 
         if (status == BT_FIELD_STRING_SET_VALUE_STATUS_MEMORY_ERROR) {
-            throw LibMemoryError {};
+            throw MemoryError {};
         }
+    }
 
-        return *this;
+    void value(const std::string& val) const
+    {
+        this->value(val.data());
     }
 
-    CommonStringField<LibObjT>& operator=(const std::string& val) noexcept
+    void append(const char * const begin, const std::uint64_t len) const
     {
-        return *this = val.data();
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstStringField`.");
+
+        const auto status = bt_field_string_append_with_length(this->libObjPtr(), begin, len);
+
+        if (status == BT_FIELD_STRING_APPEND_STATUS_MEMORY_ERROR) {
+            throw MemoryError {};
+        }
     }
 
-    void clear() noexcept
+    void append(const std::string& val) const
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        this->append(val.data(), val.size());
+    }
+
+    void clear() const noexcept
+    {
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstStringField`.");
 
         bt_field_string_clear(this->libObjPtr());
     }
 
-    bpstd::string_view value() const noexcept
+    const char *value() const noexcept
     {
         return bt_field_string_get_value(this->libObjPtr());
     }
@@ -793,6 +1012,22 @@ using ConstStringField = CommonStringField<const bt_field>;
 
 namespace internal {
 
+struct StringFieldTypeDescr
+{
+    using Const = ConstStringField;
+    using NonConst = StringField;
+};
+
+template <>
+struct TypeDescr<StringField> : public StringFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstStringField> : public StringFieldTypeDescr
+{
+};
+
 template <typename LibObjT>
 struct CommonStructureFieldSpec;
 
@@ -840,8 +1075,7 @@ private:
     using _Spec = internal::CommonStructureFieldSpec<LibObjT>;
 
 public:
-    using Class = typename std::conditional<std::is_const<LibObjT>::value, ConstStructureFieldClass,
-                                            StructureFieldClass>::type;
+    using Class = internal::DepType<LibObjT, StructureFieldClass, ConstStructureFieldClass>;
 
     explicit CommonStructureField(const _LibObjPtr libObjPtr) noexcept :
         _ThisCommonField {libObjPtr}
@@ -850,64 +1084,39 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonStructureField(const CommonStructureField<OtherLibObjT>& val) noexcept :
+    CommonStructureField(const CommonStructureField<OtherLibObjT> val) noexcept :
         _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonStructureField<LibObjT>& operator=(const CommonStructureField<OtherLibObjT>& val) noexcept
+    CommonStructureField<LibObjT> operator=(const CommonStructureField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    ConstStructureFieldClass cls() const noexcept
+    CommonStructureField<const bt_field> asConst() const noexcept
     {
-        return ConstStructureFieldClass {
-            internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return CommonStructureField<const bt_field> {*this};
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
 
-    std::uint64_t size() const noexcept
-    {
-        return this->cls().size();
-    }
-
-    ConstField operator[](const std::uint64_t index) const noexcept
+    std::uint64_t length() const noexcept
     {
-        return ConstField {internal::CommonStructureFieldSpec<const bt_field>::memberFieldByIndex(
-            this->libObjPtr(), index)};
+        return this->cls().length();
     }
 
-    CommonField<LibObjT> operator[](const std::uint64_t index) noexcept
+    CommonField<LibObjT> operator[](const std::uint64_t index) const noexcept
     {
         return CommonField<LibObjT> {_Spec::memberFieldByIndex(this->libObjPtr(), index)};
     }
 
-    nonstd::optional<ConstField> operator[](const char * const name) const noexcept
-    {
-        const auto libObjPtr =
-            internal::CommonStructureFieldSpec<const bt_field>::memberFieldByName(this->libObjPtr(),
-                                                                                  name);
-
-        if (libObjPtr) {
-            return ConstField {libObjPtr};
-        }
-
-        return nonstd::nullopt;
-    }
-
-    nonstd::optional<ConstField> operator[](const std::string& name) const noexcept
-    {
-        return (*this)[name.data()];
-    }
-
-    nonstd::optional<CommonField<LibObjT>> operator[](const char * const name) noexcept
+    bt2s::optional<CommonField<LibObjT>> operator[](const char * const name) const noexcept
     {
         const auto libObjPtr = _Spec::memberFieldByName(this->libObjPtr(), name);
 
@@ -915,10 +1124,10 @@ public:
             return CommonField<LibObjT> {libObjPtr};
         }
 
-        return nonstd::nullopt;
+        return bt2s::nullopt;
     }
 
-    nonstd::optional<CommonField<LibObjT>> operator[](const std::string& name) noexcept
+    bt2s::optional<CommonField<LibObjT>> operator[](const std::string& name) const noexcept
     {
         return (*this)[name.data()];
     }
@@ -929,6 +1138,22 @@ using ConstStructureField = CommonStructureField<const bt_field>;
 
 namespace internal {
 
+struct StructureFieldTypeDescr
+{
+    using Const = ConstStructureField;
+    using NonConst = StructureField;
+};
+
+template <>
+struct TypeDescr<StructureField> : public StructureFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstStructureField> : public StructureFieldTypeDescr
+{
+};
+
 template <typename LibObjT>
 struct CommonArrayFieldSpec;
 
@@ -968,8 +1193,7 @@ protected:
     using _ThisCommonArrayField = CommonArrayField<LibObjT>;
 
 public:
-    using Class = typename std::conditional<std::is_const<LibObjT>::value, ConstArrayFieldClass,
-                                            ArrayFieldClass>::type;
+    using Class = internal::DepType<LibObjT, ArrayFieldClass, ConstArrayFieldClass>;
 
     explicit CommonArrayField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr}
     {
@@ -977,24 +1201,23 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonArrayField(const CommonArrayField<OtherLibObjT>& val) noexcept : _ThisCommonField {val}
+    CommonArrayField(const CommonArrayField<OtherLibObjT> val) noexcept : _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    _ThisCommonArrayField& operator=(const CommonArrayField<OtherLibObjT>& val) noexcept
+    _ThisCommonArrayField operator=(const CommonArrayField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    ConstArrayFieldClass cls() const noexcept
+    CommonArrayField<const bt_field> asConst() const noexcept
     {
-        return ConstArrayFieldClass {
-            internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return CommonArrayField<const bt_field> {*this};
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
@@ -1004,13 +1227,7 @@ public:
         return bt_field_array_get_length(this->libObjPtr());
     }
 
-    ConstField operator[](const std::uint64_t index) const noexcept
-    {
-        return ConstField {internal::CommonArrayFieldSpec<const bt_field>::elementFieldByIndex(
-            this->libObjPtr(), index)};
-    }
-
-    CommonField<LibObjT> operator[](const std::uint64_t index) noexcept
+    CommonField<LibObjT> operator[](const std::uint64_t index) const noexcept
     {
         return CommonField<LibObjT> {_Spec::elementFieldByIndex(this->libObjPtr(), index)};
     }
@@ -1019,6 +1236,26 @@ public:
 using ArrayField = CommonArrayField<bt_field>;
 using ConstArrayField = CommonArrayField<const bt_field>;
 
+namespace internal {
+
+struct ArrayFieldTypeDescr
+{
+    using Const = ConstArrayField;
+    using NonConst = ArrayField;
+};
+
+template <>
+struct TypeDescr<ArrayField> : public ArrayFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstArrayField> : public ArrayFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
 class CommonDynamicArrayField : public CommonArrayField<LibObjT>
 {
@@ -1034,32 +1271,38 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonDynamicArrayField(const CommonDynamicArrayField<OtherLibObjT>& val) noexcept :
+    CommonDynamicArrayField(const CommonDynamicArrayField<OtherLibObjT> val) noexcept :
         _ThisCommonArrayField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonDynamicArrayField<LibObjT>&
-    operator=(const CommonDynamicArrayField<OtherLibObjT>& val) noexcept
+    CommonDynamicArrayField<LibObjT>
+    operator=(const CommonDynamicArrayField<OtherLibObjT> val) noexcept
     {
         _ThisCommonArrayField::operator=(val);
         return *this;
     }
 
+    CommonDynamicArrayField<const bt_field> asConst() const noexcept
+    {
+        return CommonDynamicArrayField<const bt_field> {*this};
+    }
+
     std::uint64_t length() const noexcept
     {
         return _ThisCommonArrayField::length();
     }
 
-    void length(const std::uint64_t length)
+    void length(const std::uint64_t length) const
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstDynamicArrayField`.");
 
         const auto status = bt_field_array_dynamic_set_length(this->libObjPtr(), length);
 
         if (status == BT_FIELD_DYNAMIC_ARRAY_SET_LENGTH_STATUS_MEMORY_ERROR) {
-            throw LibMemoryError {};
+            throw MemoryError {};
         }
     }
 };
@@ -1069,6 +1312,22 @@ using ConstDynamicArrayField = CommonDynamicArrayField<const bt_field>;
 
 namespace internal {
 
+struct DynamicArrayFieldTypeDescr
+{
+    using Const = ConstDynamicArrayField;
+    using NonConst = DynamicArrayField;
+};
+
+template <>
+struct TypeDescr<DynamicArrayField> : public DynamicArrayFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstDynamicArrayField> : public DynamicArrayFieldTypeDescr
+{
+};
+
 template <typename LibObjT>
 struct CommonOptionFieldSpec;
 
@@ -1103,8 +1362,7 @@ private:
     using _Spec = internal::CommonOptionFieldSpec<LibObjT>;
 
 public:
-    using Class = typename std::conditional<std::is_const<LibObjT>::value, ConstOptionFieldClass,
-                                            OptionFieldClass>::type;
+    using Class = internal::DepType<LibObjT, OptionFieldClass, ConstOptionFieldClass>;
 
     explicit CommonOptionField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr}
     {
@@ -1112,53 +1370,41 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonOptionField(const CommonOptionField<OtherLibObjT>& val) noexcept : _ThisCommonField {val}
+    CommonOptionField(const CommonOptionField<OtherLibObjT> val) noexcept : _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonOptionField<LibObjT>& operator=(const CommonOptionField<OtherLibObjT>& val) noexcept
+    CommonOptionField<LibObjT> operator=(const CommonOptionField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    ConstOptionFieldClass cls() const noexcept
+    CommonOptionField<const bt_field> asConst() const noexcept
     {
-        return ConstOptionFieldClass {
-            internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return CommonOptionField<const bt_field> {*this};
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
 
-    void hasField(const bool hasField) noexcept
+    void hasField(const bool hasField) const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstOptionField`.");
 
         bt_field_option_set_has_field(this->libObjPtr(), static_cast<bt_bool>(hasField));
     }
 
     bool hasField() const noexcept
     {
-        return this->field();
+        return this->field().has_value();
     }
 
-    nonstd::optional<ConstField> field() const noexcept
-    {
-        const auto libObjPtr =
-            internal::CommonOptionFieldSpec<const bt_field>::field(this->libObjPtr());
-
-        if (libObjPtr) {
-            return ConstField {libObjPtr};
-        }
-
-        return nonstd::nullopt;
-    }
-
-    nonstd::optional<CommonField<LibObjT>> field() noexcept
+    bt2s::optional<CommonField<LibObjT>> field() const noexcept
     {
         const auto libObjPtr = _Spec::field(this->libObjPtr());
 
@@ -1166,7 +1412,7 @@ public:
             return CommonField<LibObjT> {libObjPtr};
         }
 
-        return nonstd::nullopt;
+        return bt2s::nullopt;
     }
 };
 
@@ -1175,6 +1421,22 @@ using ConstOptionField = CommonOptionField<const bt_field>;
 
 namespace internal {
 
+struct OptionFieldTypeDescr
+{
+    using Const = ConstOptionField;
+    using NonConst = OptionField;
+};
+
+template <>
+struct TypeDescr<OptionField> : public OptionFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstOptionField> : public OptionFieldTypeDescr
+{
+};
+
 template <typename LibObjT>
 struct CommonVariantFieldSpec;
 
@@ -1209,8 +1471,7 @@ private:
     using _Spec = internal::CommonVariantFieldSpec<LibObjT>;
 
 public:
-    using Class = typename std::conditional<std::is_const<LibObjT>::value, ConstVariantFieldClass,
-                                            VariantFieldClass>::type;
+    using Class = internal::DepType<LibObjT, VariantFieldClass, ConstVariantFieldClass>;
 
     explicit CommonVariantField(const _LibObjPtr libObjPtr) noexcept : _ThisCommonField {libObjPtr}
     {
@@ -1218,43 +1479,36 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonVariantField(const CommonVariantField<OtherLibObjT>& val) noexcept :
-        _ThisCommonField {val}
+    CommonVariantField(const CommonVariantField<OtherLibObjT> val) noexcept : _ThisCommonField {val}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonVariantField<LibObjT>& operator=(const CommonVariantField<OtherLibObjT>& val) noexcept
+    CommonVariantField<LibObjT> operator=(const CommonVariantField<OtherLibObjT> val) noexcept
     {
         _ThisCommonField::operator=(val);
         return *this;
     }
 
-    ConstVariantFieldClass cls() const noexcept
+    CommonVariantField<const bt_field> asConst() const noexcept
     {
-        return ConstVariantFieldClass {
-            internal::CommonFieldSpec<const bt_field>::cls(this->libObjPtr())};
+        return CommonVariantField<const bt_field> {*this};
     }
 
-    Class cls() noexcept
+    Class cls() const noexcept
     {
         return Class {internal::CommonFieldSpec<LibObjT>::cls(this->libObjPtr())};
     }
 
-    void selectOption(const std::uint64_t index) noexcept
+    void selectOption(const std::uint64_t index) const noexcept
     {
-        static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+        static_assert(!std::is_const<LibObjT>::value,
+                      "Not available with `bt2::ConstVariantField`.");
 
         static_cast<void>(bt_field_variant_select_option_by_index(this->libObjPtr(), index));
     }
 
-    ConstField selectedOptionField() const noexcept
-    {
-        return ConstField {internal::CommonVariantFieldSpec<const bt_field>::selectedOptionField(
-            this->libObjPtr())};
-    }
-
-    CommonField<LibObjT> selectedOptionField() noexcept
+    CommonField<LibObjT> selectedOptionField() const noexcept
     {
         return CommonField<LibObjT> {_Spec::selectedOptionField(this->libObjPtr())};
     }
@@ -1268,6 +1522,26 @@ public:
 using VariantField = CommonVariantField<bt_field>;
 using ConstVariantField = CommonVariantField<const bt_field>;
 
+namespace internal {
+
+struct VariantFieldTypeDescr
+{
+    using Const = ConstVariantField;
+    using NonConst = VariantField;
+};
+
+template <>
+struct TypeDescr<VariantField> : public VariantFieldTypeDescr
+{
+};
+
+template <>
+struct TypeDescr<ConstVariantField> : public VariantFieldTypeDescr
+{
+};
+
+} /* namespace internal */
+
 template <typename LibObjT>
 CommonBoolField<LibObjT> CommonField<LibObjT>::asBool() const noexcept
 {
This page took 0.039376 seconds and 4 git commands to generate.