From 4905ad2d6a83e9eee915f3756c71bb33e295ada9 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 12 Jul 2019 13:46:43 +0200 Subject: [PATCH] [RF] Make spans assignable. --- core/foundation/inc/ROOT/span.hxx | 6 +++--- roofit/roofitcore/inc/RooSpan.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/foundation/inc/ROOT/span.hxx b/core/foundation/inc/ROOT/span.hxx index 640f59d47aa28..f458c778f9b64 100644 --- a/core/foundation/inc/ROOT/span.hxx +++ b/core/foundation/inc/ROOT/span.hxx @@ -225,7 +225,7 @@ public: : length_(l.size()), data_(std::begin(l)) {} - span& operator=(span const&) noexcept = delete; + span& operator=(span const&) noexcept = default; span& operator=(span &&) noexcept = delete; /* @@ -432,8 +432,8 @@ private: } private: - index_type const length_; - pointer const data_; + index_type length_; + pointer data_; }; // }}} } // inline namespace __ROOT diff --git a/roofit/roofitcore/inc/RooSpan.h b/roofit/roofitcore/inc/RooSpan.h index f1255c7995ffd..4523f96ef98c2 100644 --- a/roofit/roofitcore/inc/RooSpan.h +++ b/roofit/roofitcore/inc/RooSpan.h @@ -101,6 +101,9 @@ class RooSpan { { } + RooSpan& operator=(const RooSpan& other) = default; + + constexpr typename std::span::iterator begin() const { return _span.begin(); }