Make SkSpan C++11 compatible.
In C++11 constexpr operators cannot be defaulted.
Change-Id: Ibc73d9b9291f3e1a45bb5c0a7ff59c2b90a3e380
Reviewed-on: https://skia-review.googlesource.com/c/191567
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/src/core/SkSpan.h b/src/core/SkSpan.h
index 8f8e96b..b4585cb 100644
--- a/src/core/SkSpan.h
+++ b/src/core/SkSpan.h
@@ -21,7 +21,11 @@
template <typename U>
constexpr explicit SkSpan(std::vector<U>& v) : fPtr{v.data()}, fSize{v.size()} {}
constexpr SkSpan(const SkSpan& o) = default;
- constexpr SkSpan& operator=( const SkSpan& other ) = default;
+ constexpr SkSpan& operator=(const SkSpan& that) {
+ fPtr = that.fPtr;
+ fSize = that.fSize;
+ return *this;
+ }
constexpr T& operator [] (size_t i) const { return fPtr[i]; }
constexpr T* begin() const { return fPtr; }
constexpr T* end() const { return fPtr + fSize; }