summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-01-29 15:31:27 +0100
committerBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-03-25 12:21:21 +0100
commita17df1be5e9d6cba75f939e5e7e9f52cb51395d8 (patch)
treed32ff5bb1b8d8721a592a736ed1711d8d812969b
parent22dcaeacd03bc4d17fd33bdf17c516a74a1883c5 (diff)
libcamera: base: span: Explicitly default copy assignment
The `dynamic_extent` specialization is currently not trivially copyable unlike its standard counterpart, `std::span`. This is because the copy assignment operator is user-defined. Explicitly default it just like it is done in the main template definition. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--include/libcamera/base/span.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/libcamera/base/span.h b/include/libcamera/base/span.h
index 92cce4f0..806db106 100644
--- a/include/libcamera/base/span.h
+++ b/include/libcamera/base/span.h
@@ -346,13 +346,7 @@ public:
}
constexpr Span(const Span &other) noexcept = default;
-
- constexpr Span &operator=(const Span &other) noexcept
- {
- data_ = other.data_;
- size_ = other.size_;
- return *this;
- }
+ constexpr Span &operator=(const Span &other) noexcept = default;
constexpr iterator begin() const { return data(); }
constexpr const_iterator cbegin() const { return begin(); }