Skip to content

Commit

Permalink
Compatibility with clang-6
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Jun 30, 2022
1 parent aa60d67 commit 592c298
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/openPMD/RecordComponent.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,12 @@ RecordComponent::storeChunk( Offset offset, Extent extent )
std::move( extent ),
[]( size_t size )
{
#if defined(__clang_major__) && __clang_major__ < 7
return std::shared_ptr< T >{
new T[ size ], []( auto * ptr ) { delete[] ptr; } };
#else
return std::shared_ptr< T[] >{ new T[ size ] };
#endif
} );
}
}

0 comments on commit 592c298

Please sign in to comment.