init const sharedArray from sequence

"cheat" to allow newly allocated const array
to be initialized from a sequence.
This commit is contained in:
Michael Davidsaver
2021-04-24 12:48:28 -07:00
parent f88733d7c6
commit f0c123ae28
+1 -1
View File
@@ -274,7 +274,7 @@ public:
shared_array(Iter begin, Iter end)
:shared_array(std::distance(begin, end))
{
std::copy(begin, end, this->begin());
std::copy(begin, end, const_cast<_E_non_const*>(this->begin()));
}
//! @brief Allocate (with new[]) a new vector of size c