Skip to content

Commit

Permalink
Array: remove make_shared<T[]> as this requires C++20
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Feb 11, 2024
1 parent 56baccd commit 4292fc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/stir/Array.inl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Array<num_dimensions, elemT>::Array(const IndexRange<num_dimensions>& range, sha
{
if (copy_data)
{
this->_allocated_full_data_ptr = std::make_shared<elemT[]>(range.size_all());
this->_allocated_full_data_ptr = std::shared_ptr<elemT[]>(new elemT[range.size_all()]);
std::copy(data_sptr.get(), data_sptr.get() + range.size_all(), this->_allocated_full_data_ptr.get());
}
else
Expand Down

0 comments on commit 4292fc4

Please sign in to comment.