2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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:
John Preston
2017-12-11 16:28:58 +04:00
parent 38f7f48c17
commit 9d4558de2b
3 changed files with 26 additions and 10 deletions

View File

@@ -260,10 +260,18 @@ Cover::Cover(
void Cover::setupChildGeometry() {
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(
toggleShownValue(),
widthValue(),
_2)
widthValue())
| rpl::map([](bool shown, int width) { return width; })
| rpl::start_with_next([this](int newWidth) {
_userpic->moveToLeft(
st::infoProfilePhotoLeft,
@@ -449,10 +457,18 @@ void SharedMediaCover::createLabel() {
Lang::Viewer(lng_profile_shared_media) | ToUpperValue(),
st::infoBlockHeaderLabel);
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(
toggleShownValue(),
widthValue(),
_2)
widthValue())
| rpl::map([](bool shown, int width) { return width; })
| rpl::start_with_next([this, weak = label.data()](int newWidth) {
auto availableWidth = newWidth
- st::infoBlockHeaderPosition.x()