Skip to content

Commit 66ee89d

Browse files
authored
[backport] Workaround Apple clang issue. (dmlc#9615) (dmlc#9636)
1 parent 54d1d72 commit 66ee89d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common/io.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ class PrivateMmapConstStream : public AlignedResourceReadStream {
384384
* @param length See the `length` parameter of `mmap` for details.
385385
*/
386386
explicit PrivateMmapConstStream(std::string path, std::size_t offset, std::size_t length)
387-
: AlignedResourceReadStream{std::make_shared<MmapResource>(path, offset, length)} {}
387+
: AlignedResourceReadStream{std::shared_ptr<MmapResource>{ // NOLINT
388+
new MmapResource{std::move(path), offset, length}}} {}
388389
~PrivateMmapConstStream() noexcept(false) override;
389390
};
390391

0 commit comments

Comments
 (0)