mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-14 02:14:44 +00:00
Fix build in Visual Studio 15.5.1.
Looks like compiler had some regressions when updating from 15.4.5. Range-V3-VS2015 also needs to cherry-pick this commit: https://github.com/ericniebler/range-v3/commit/9f990c48d0 See https://github.com/Microsoft/Range-V3-VS2015/issues/26
This commit is contained in:
parent
38f7f48c17
commit
9d4558de2b
@ -715,10 +715,10 @@ public:
|
|||||||
}
|
}
|
||||||
void peerListSortRows(
|
void peerListSortRows(
|
||||||
base::lambda<bool(const PeerListRow &a, const PeerListRow &b)> compare) override {
|
base::lambda<bool(const PeerListRow &a, const PeerListRow &b)> compare) override {
|
||||||
_content->reorderRows([compare = std::move(compare)](
|
_content->reorderRows([&](
|
||||||
auto &&begin,
|
auto &&begin,
|
||||||
auto &&end) {
|
auto &&end) {
|
||||||
std::sort(begin, end, [&compare](auto &&a, auto &&b) {
|
std::sort(begin, end, [&](auto &&a, auto &&b) {
|
||||||
return compare(*a, *b);
|
return compare(*a, *b);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -726,10 +726,10 @@ public:
|
|||||||
int peerListPartitionRows(
|
int peerListPartitionRows(
|
||||||
base::lambda<bool(const PeerListRow &a)> border) override {
|
base::lambda<bool(const PeerListRow &a)> border) override {
|
||||||
auto result = 0;
|
auto result = 0;
|
||||||
_content->reorderRows([border = std::move(border), &result](
|
_content->reorderRows([&](
|
||||||
auto &&begin,
|
auto &&begin,
|
||||||
auto &&end) {
|
auto &&end) {
|
||||||
auto edge = std::stable_partition(begin, end, [&border](
|
auto edge = std::stable_partition(begin, end, [&](
|
||||||
auto &¤t) {
|
auto &¤t) {
|
||||||
return border(*current);
|
return border(*current);
|
||||||
});
|
});
|
||||||
|
@ -260,10 +260,18 @@ Cover::Cover(
|
|||||||
|
|
||||||
void Cover::setupChildGeometry() {
|
void Cover::setupChildGeometry() {
|
||||||
using namespace rpl::mappers;
|
using namespace rpl::mappers;
|
||||||
|
//
|
||||||
|
// Visual Studio 2017 15.5.1 internal compiler error here.
|
||||||
|
// See https://developercommunity.visualstudio.com/content/problem/165155/ice-regression-in-1551-after-successfull-build-in.html
|
||||||
|
//
|
||||||
|
//rpl::combine(
|
||||||
|
// toggleShownValue(),
|
||||||
|
// widthValue(),
|
||||||
|
// _2)
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
toggleShownValue(),
|
toggleShownValue(),
|
||||||
widthValue(),
|
widthValue())
|
||||||
_2)
|
| rpl::map([](bool shown, int width) { return width; })
|
||||||
| rpl::start_with_next([this](int newWidth) {
|
| rpl::start_with_next([this](int newWidth) {
|
||||||
_userpic->moveToLeft(
|
_userpic->moveToLeft(
|
||||||
st::infoProfilePhotoLeft,
|
st::infoProfilePhotoLeft,
|
||||||
@ -449,10 +457,18 @@ void SharedMediaCover::createLabel() {
|
|||||||
Lang::Viewer(lng_profile_shared_media) | ToUpperValue(),
|
Lang::Viewer(lng_profile_shared_media) | ToUpperValue(),
|
||||||
st::infoBlockHeaderLabel);
|
st::infoBlockHeaderLabel);
|
||||||
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
|
//
|
||||||
|
// Visual Studio 2017 15.5.1 internal compiler error here.
|
||||||
|
// See https://developercommunity.visualstudio.com/content/problem/165155/ice-regression-in-1551-after-successfull-build-in.html
|
||||||
|
//
|
||||||
|
//rpl::combine(
|
||||||
|
// toggleShownValue(),
|
||||||
|
// widthValue(),
|
||||||
|
// _2)
|
||||||
rpl::combine(
|
rpl::combine(
|
||||||
toggleShownValue(),
|
toggleShownValue(),
|
||||||
widthValue(),
|
widthValue())
|
||||||
_2)
|
| rpl::map([](bool shown, int width) { return width; })
|
||||||
| rpl::start_with_next([this, weak = label.data()](int newWidth) {
|
| rpl::start_with_next([this, weak = label.data()](int newWidth) {
|
||||||
auto availableWidth = newWidth
|
auto availableWidth = newWidth
|
||||||
- st::infoBlockHeaderPosition.x()
|
- st::infoBlockHeaderPosition.x()
|
||||||
|
@ -35,12 +35,12 @@
|
|||||||
'VCCLCompilerTool': {
|
'VCCLCompilerTool': {
|
||||||
'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
|
'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
|
||||||
'DebugInformationFormat': '3', # Program Database (/Zi)
|
'DebugInformationFormat': '3', # Program Database (/Zi)
|
||||||
|
'WarnAsError': 'true',
|
||||||
'AdditionalOptions': [
|
'AdditionalOptions': [
|
||||||
'/std:c++latest',
|
'/std:c++latest',
|
||||||
'/permissive-',
|
'/permissive-',
|
||||||
'/MP', # Enable multi process build.
|
'/MP', # Enable multi process build.
|
||||||
'/EHsc', # Catch C++ exceptions only, extern C functions never throw a C++ exception.
|
'/EHsc', # Catch C++ exceptions only, extern C functions never throw a C++ exception.
|
||||||
'/WX', # Treat warnings as errors.
|
|
||||||
'/w14834', # [[nodiscard]]
|
'/w14834', # [[nodiscard]]
|
||||||
],
|
],
|
||||||
'TreatWChar_tAsBuiltInType': 'false',
|
'TreatWChar_tAsBuiltInType': 'false',
|
||||||
|
Loading…
Reference in New Issue
Block a user