Merge pull request #243 from garyfurnish/master

Fix issue #242
This commit is contained in:
Neil MacIntosh 2016-01-13 08:44:25 -08:00
commit 6b82ac3d9c

View File

@ -1818,7 +1818,7 @@ public:
auto d = narrow_cast<size_type>(sizeof(OtherValueType) / sizeof(value_type)); auto d = narrow_cast<size_type>(sizeof(OtherValueType) / sizeof(value_type));
size_type size = this->bounds().total_size() / d; size_type size = this->bounds().total_size() / d;
return {(OtherValueType*) this->data(), size, return {const_cast<OtherValueType*>(reinterpret_cast<const OtherValueType*>(this->data())), size,
bounds_type{resize_extent(this->bounds().index_bounds(), d), bounds_type{resize_extent(this->bounds().index_bounds(), d),
resize_stride(this->bounds().strides(), d)}}; resize_stride(this->bounds().strides(), d)}};
} }