Skip to content

Commit 7ee2a8f

Browse files
lums658ihnorton
authored andcommitted
Replace tests for __APPLE__ with tests for __cpp_lib_smart_ptr_for_overwrite
1 parent 2ad1ae4 commit 7ee2a8f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/include/detail/linalg/tdb_matrix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class tdbBlockedMatrix : public Matrix<T, LayoutPolicy, I> {
183183
blocksize_ = upper_bound;
184184
}
185185

186-
#ifndef __APPLE__
186+
#ifdef __cpp_lib_smart_ptr_for_overwrite
187187
auto data_ = std::make_unique_for_overwrite<T[]>(dimension * blocksize_);
188188
#else
189189
// auto data_ = std::make_unique<T[]>(new T[mat_rows_ * mat_cols_]);
@@ -341,7 +341,7 @@ class tdbBlockedMatrix : public Matrix<T, LayoutPolicy, I> {
341341
auto num_rows = row_end - row_begin;
342342
auto num_cols = col_end - col_begin;
343343

344-
#ifndef __APPLE__
344+
#ifdef __cpp_lib_smart_ptr_for_overwrite
345345
auto data_ = std::make_unique_for_overwrite<T[]>(num_rows * num_cols);
346346
#else
347347
// auto data_ = std::make_unique<T[]>(new T[mat_rows_ * mat_cols_]);

src/include/detail/linalg/tdb_partitioned_matrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ class tdbPartitionedMatrix : public Matrix<T, LayoutPolicy, I> {
252252
ids_.resize(max_cols_);
253253
}
254254

255-
#ifndef __APPLE__
255+
#ifdef __cpp_lib_smart_ptr_for_overwrite
256256
auto data_ = std::make_unique_for_overwrite<T[]>(dimension * max_cols_);
257257
#else
258258
auto data_ = std::unique_ptr<T[]>(new T[dimension * max_cols_]);

0 commit comments

Comments
 (0)