From 62b063a27258f8d6344a4ddd49ddd8739f71eb49 Mon Sep 17 00:00:00 2001 From: Gary Furnish Date: Wed, 13 Jan 2016 16:12:17 +0000 Subject: [PATCH] Fix issue #242 --- include/span.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/span.h b/include/span.h index 72d55d6..31c26ad 100644 --- a/include/span.h +++ b/include/span.h @@ -1818,7 +1818,7 @@ public: auto d = narrow_cast(sizeof(OtherValueType) / sizeof(value_type)); size_type size = this->bounds().total_size() / d; - return {(OtherValueType*) this->data(), size, + return {const_cast(reinterpret_cast(this->data())), size, bounds_type{resize_extent(this->bounds().index_bounds(), d), resize_stride(this->bounds().strides(), d)}}; }