From 417c3ba47e3b60d16cecff81eb59547e9fc36d9a Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Thu, 28 Sep 2023 22:51:47 +0800 Subject: [PATCH] Workaround Apple clang issue. (#9615) --- src/common/io.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/io.h b/src/common/io.h index 07bb60787..2eb62b094 100644 --- a/src/common/io.h +++ b/src/common/io.h @@ -382,7 +382,8 @@ class PrivateMmapConstStream : public AlignedResourceReadStream { * @param length See the `length` parameter of `mmap` for details. */ explicit PrivateMmapConstStream(std::string path, std::size_t offset, std::size_t length) - : AlignedResourceReadStream{std::make_shared(path, offset, length)} {} + : AlignedResourceReadStream{std::shared_ptr{ // NOLINT + new MmapResource{std::move(path), offset, length}}} {} ~PrivateMmapConstStream() noexcept(false) override; };