Fix build for the original range-v3.

This commit is contained in:
John Preston 2017-11-25 01:05:14 +04:00
parent 6a4aa184f3
commit 837dac50fa
4 changed files with 37 additions and 1 deletions

View File

@ -456,7 +456,7 @@ DeleteMessagesBox::DeleteMessagesBox(
std::vector<FullMsgId> DeleteMessagesBox::CollectFrom(
const SelectedItemSet &items) {
return ranges::make_range(
return ranges::make_iterator_range(
items.begin(),
items.end()
) | ranges::view::transform([](not_null<HistoryItem*> item) {

View File

@ -0,0 +1,31 @@
/*
This file is part of Telegram Desktop,
the official desktop version of Telegram messaging app, see https://telegram.org
Telegram Desktop is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
It is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
In addition, as a special exception, the copyright holders give permission
to link the code of portions of this program with the OpenSSL library.
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
*/
#pragma once
namespace ranges {
inline namespace v3 {
namespace {
constexpr auto &&make_iterator_range = make_range;
} // namespace
} // inline namespace v3
} // namespace ranges

View File

@ -63,7 +63,11 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include <map>
#include <algorithm>
#include <memory>
#include <range/v3/all.hpp>
#ifdef Q_OS_WIN
#include "platform/win/windows_range_v3_helpers.h"
#endif // Q_OS_WIN
// Ensures/Expects.
#include <gsl/gsl_assert>

View File

@ -438,6 +438,7 @@
<(src_loc)/platform/win/windows_dlls.h
<(src_loc)/platform/win/windows_event_filter.cpp
<(src_loc)/platform/win/windows_event_filter.h
<(src_loc)/platform/win/windows_range_v3_helpers.h
<(src_loc)/platform/platform_audio.h
<(src_loc)/platform/platform_file_utilities.h
<(src_loc)/platform/platform_main_window.h