cpp-common: remove `cfg-*.hpp` and `log-cfg.hpp`
[babeltrace.git] / src / cpp-common / bt2 / integer-range.hpp
index 125707187fc5c390ec05c899da2c322eaaf6ac1a..026e1d5246a5a06061a6888e008052ed4549410c 100644 (file)
 
 #include <babeltrace2/babeltrace.h>
 
-#include "internal/borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 
 namespace bt2 {
-
 namespace internal {
 
 template <typename ValueT>
@@ -66,12 +65,11 @@ struct ConstIntegerRangeSpec<const bt_integer_range_signed> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class ConstIntegerRange final : public internal::BorrowedObj<LibObjT>
+class ConstIntegerRange final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename internal::BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename internal::BorrowedObj<LibObjT>::_LibObjPtr;
-    using _ThisConstIntegerRange = ConstIntegerRange<LibObjT>;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
 
 public:
     using Value =
@@ -79,27 +77,18 @@ public:
                                   std::uint64_t, std::int64_t>::type;
 
 public:
-    explicit ConstIntegerRange(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
-    {
-    }
-
-    ConstIntegerRange(const _ThisConstIntegerRange& range) noexcept : _ThisBorrowedObj {range}
-    {
-    }
-
-    _ThisConstIntegerRange& operator=(const _ThisConstIntegerRange& range) noexcept
+    explicit ConstIntegerRange(const _LibObjPtr libObjPtr) noexcept :
+        _ThisBorrowedObject {libObjPtr}
     {
-        _ThisBorrowedObj::operator=(range);
-        return *this;
     }
 
-    bool operator==(const _ThisConstIntegerRange& other) const noexcept
+    bool operator==(const ConstIntegerRange& other) const noexcept
     {
         return internal::ConstIntegerRangeSpec<LibObjT>::isEqual(this->libObjPtr(),
                                                                  other.libObjPtr());
     }
 
-    bool operator!=(const _ThisConstIntegerRange& other) const noexcept
+    bool operator!=(const ConstIntegerRange& other) const noexcept
     {
         return !(*this == other);
     }
This page took 0.023194 seconds and 4 git commands to generate.