[backport] Workaround Apple clang issue. (#9615) (#9636)

This commit is contained in:
Jiaming Yuan
2023-10-08 15:42:15 +08:00
committed by GitHub
parent 54d1d72d01
commit 66ee89d8b4

View File

@@ -384,7 +384,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<MmapResource>(path, offset, length)} {}
: AlignedResourceReadStream{std::shared_ptr<MmapResource>{ // NOLINT
new MmapResource{std::move(path), offset, length}}} {}
~PrivateMmapConstStream() noexcept(false) override;
};