Skip to content

Commit 34a9d6f

Browse files
committed
Compatibility with clang-6
1 parent 99a8c56 commit 34a9d6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/openPMD/RecordComponent.tpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,12 @@ RecordComponent::storeChunk( Offset offset, Extent extent )
338338
std::move( extent ),
339339
[]( size_t size )
340340
{
341+
#if defined(__clang_major__) && __clang_major__ < 7
342+
return std::shared_ptr< T >{
343+
new T[ size ], []( auto * ptr ) { delete[] ptr; } };
344+
#else
341345
return std::shared_ptr< T[] >{ new T[ size ] };
346+
#endif
342347
} );
343348
}
344349
}

0 commit comments

Comments
 (0)