diff --git a/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp b/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp index afde3180c..92653bcac 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_keywords.cpp @@ -449,7 +449,7 @@ std::vector EmojiKeywords::LangPack::query( } const auto from = _data.emoji.lower_bound(normalized); - auto &&chosen = ranges::subrange( + auto &&chosen = ranges::make_subrange( from, end(_data.emoji) ) | ranges::view::take_while([&](const auto &pair) { diff --git a/Telegram/SourceFiles/data/data_channel.cpp b/Telegram/SourceFiles/data/data_channel.cpp index 129a7e028..2435a1631 100644 --- a/Telegram/SourceFiles/data/data_channel.cpp +++ b/Telegram/SourceFiles/data/data_channel.cpp @@ -764,7 +764,7 @@ void ApplyMegagroupAdmins( } auto adding = base::flat_map(); - auto admins = ranges::subrange( + auto admins = ranges::make_subrange( list.begin(), list.end() ) | ranges::view::transform([](const MTPChannelParticipant &p) { const auto userId = p.match([](const auto &data) { diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index f485726c9..305f9c71d 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -2444,7 +2444,7 @@ MessageIdsList HistoryInner::getSelectedItems() const { return {}; } - auto result = ranges::subrange( + auto result = ranges::make_subrange( _selected.begin(), _selected.end() ) | view::filter([](const auto &selected) { diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp index 4eaf64887..79bdfcdd1 100644 --- a/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp +++ b/Telegram/SourceFiles/media/streaming/media_streaming_reader.cpp @@ -291,7 +291,7 @@ auto Reader::Slice::prepareFill(int from, int till) -> PrepareFillResult { ranges::less(), &PartsMap::value_type::first); const auto haveTill = FindNotLoadedStart( - ranges::subrange(start, finish), + ranges::make_subrange(start, finish), fromOffset); if (haveTill < till) { result.offsetsFromLoader = offsetsFromLoader( @@ -607,14 +607,14 @@ auto Reader::Slices::fill(int offset, bytes::span buffer) -> FillResult { markSliceUsed(fromSlice); CopyLoaded( buffer, - ranges::subrange(first.start, first.finish), + ranges::make_subrange(first.start, first.finish), firstFrom, firstTill); if (fromSlice + 1 < tillSlice) { markSliceUsed(fromSlice + 1); CopyLoaded( buffer.subspan(firstTill - firstFrom), - ranges::subrange(second.start, second.finish), + ranges::make_subrange(second.start, second.finish), secondFrom, secondTill); } @@ -644,7 +644,7 @@ auto Reader::Slices::fillFromHeader(int offset, bytes::span buffer) if (prepared.ready) { CopyLoaded( buffer, - ranges::subrange(prepared.start, prepared.finish), + ranges::make_subrange(prepared.start, prepared.finish), from, till); result.filled = true; diff --git a/Telegram/SourceFiles/ui/text/text_entity.cpp b/Telegram/SourceFiles/ui/text/text_entity.cpp index 0b6a6f71a..c2c08a6cd 100644 --- a/Telegram/SourceFiles/ui/text/text_entity.cpp +++ b/Telegram/SourceFiles/ui/text/text_entity.cpp @@ -1141,7 +1141,7 @@ const QRegularExpression &RegExpWordSplit() { [[nodiscard]] QString ExpandCustomLinks(const TextWithTags &text) { const auto entities = ConvertTextTagsToEntities(text.tags); - auto &&urls = ranges::subrange( + auto &&urls = ranges::make_subrange( entities.begin(), entities.end() ) | ranges::view::filter([](const EntityInText &entity) { @@ -2098,7 +2098,7 @@ EntityInText::EntityInText( int EntityInText::FirstMonospaceOffset( const EntitiesInText &entities, int textLength) { - auto &&monospace = ranges::subrange( + auto &&monospace = ranges::make_subrange( entities.begin(), entities.end() ) | ranges::view::filter([](const EntityInText & entity) { diff --git a/Telegram/gyp/common/mac.gypi b/Telegram/gyp/common/mac.gypi index 659527825..781cb69b7 100644 --- a/Telegram/gyp/common/mac.gypi +++ b/Telegram/gyp/common/mac.gypi @@ -64,6 +64,7 @@ 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', 'GCC_OPTIMIZATION_LEVEL': '0', + 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'NO', # temp for range-v3 'ALWAYS_SEARCH_USER_PATHS': 'NO', }, 'configurations': { @@ -88,6 +89,7 @@ 'OTHER_LDFLAGS': [ '-w', # Suppress 'libstdc++ is deprecated' warning. ], + 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'NO', # temp for range-v3 }, 'defines': [ 'OS_MAC_OLD',