mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Fix issue #242
This commit is contained in:
parent
fc5fce4f4f
commit
62b063a272
@ -1818,7 +1818,7 @@ public:
|
||||
auto d = narrow_cast<size_type>(sizeof(OtherValueType) / sizeof(value_type));
|
||||
|
||||
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),
|
||||
resize_stride(this->bounds().strides(), d)}};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user