From ab6fc75f8dba360c8814beb87a27131c40d73a22 Mon Sep 17 00:00:00 2001 From: Habu Date: Sat, 24 Dec 2022 11:40:46 +0900 Subject: [PATCH] [Fix] std::ranges::transform -> std::transform MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Apple Clang 14 ではまだ The One Ranges Proposal がサポートされていないので、 C++20 で追加された std::ranges::* のSTLアルゴリズムが使用できない。 したがって従来の通りイテレータペアを受け取る std::transform を使用する。 --- src/perception/identification.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/perception/identification.cpp b/src/perception/identification.cpp index 9203b7fb2..435818814 100644 --- a/src/perception/identification.cpp +++ b/src/perception/identification.cpp @@ -47,7 +47,7 @@ bool screen_object(PlayerType *player_ptr, ItemEntity *o_ptr, BIT_FLAGS mode) const auto item_text_lines = shape_buffer(item_text, 77 - 15); int i = 0; - std::ranges::transform(item_text_lines, &info[i], [](const auto &line) { return line.data(); }); + std::transform(item_text_lines.begin(), item_text_lines.end(), &info[i], [](const auto &line) { return line.data(); }); i += item_text_lines.size(); if (o_ptr->is_equipment()) { -- 2.11.0