Print Page | Close Window

XTP and MSVC conformance mode

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23652
Printed Date: 22 December 2024 at 10:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: XTP and MSVC conformance mode
Posted By: mnissl
Subject: XTP and MSVC conformance mode
Date Posted: 12 June 2018 at 6:08am
XTP 18.4.0 (and prior) does not compile having the MSVC conformance mode enabled (/permissive-, Visual Studio 15.7.3).

We would like our application to comply with the C++ standard, but XTP needs to do so as well.

Are there any plans to make XTP compatible?



Replies:
Posted By: Hurrain
Date Posted: 19 June 2018 at 8:25am
I'm really curious about this as well. This is also one of the requirements we're going to need to fulfill sooner or later at our company.


Posted By: mnissl
Date Posted: 03 July 2018 at 4:06am
Just in case nobody has a clue what I'm talking about:

http://https://blogs.msdn.microsoft.com/vcblog/2018/05/07/announcing-msvc-conforms-to-the-c-standard/" rel="nofollow - http://https://blogs.msdn.microsoft.com/vcblog/2018/05/07/announcing-msvc-conforms-to-the-c-standard/

http://https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance" rel="nofollow - http://https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance


Posted By: a.schoenle
Date Posted: 16 November 2018 at 7:57am
Let me second this. It would be very important for us to at least compile our own sources with /permissive- enabled if they pull XTP headers. Could someone from Codejock at least hint to whether this is something you are considering in the forseeable future?



Posted By: a.schoenle
Date Posted: 16 November 2018 at 12:34pm
I got curious so I had a go at it. You can download a patch from here:
https://www.dropbox.com/s/77a3gwz62skaobj/ToolkitPro16.5.0-conforming-04277808.patch?dl=0" rel="nofollow - https://www.dropbox.com/s/77a3gwz62skaobj/ToolkitPro16.5.0-conforming-04277808.patch?dl=0

This will make the headers conforming and you should be able to compile a consumer with /permissive-.

Most of it was missing this in
this->method()
in classes with a template parameter as base and similarly missing Base:: in
Base::static_member_variable
in the same. I had to move some definitions and I had to create one extra function to avoid having to pull PaintManager in some Common header which started endless cycles.

I also started fixing some of the .cpp files to make the library compile with /permissive- but it got tedious. It seems like 90% of the remaining stuff is that
(test ? typeA : typeB)
no longer compiles if the two types can be implicitely converted into more than one common type, the use of
or
as a variable name and some missing headers. XTPToolTipContext.cpp pulls mshtml.h and thus it needs the /Zc:strictStrings- compiler option.

I would like to leave this to the CodeJock people and sincerely hope that they will incorporate this upstream so I will not have to redo it.



Posted By: a.schoenle
Date Posted: 16 November 2018 at 1:08pm
Was of course 18.5.0, not 16.5.0. Here are the patches including for 18.6.0:
http://https://www.dropbox.com/sh/xsrwaeml8920idy/AABjiD5Y-edQ5EkwdcmHg7-Va?dl=0" rel="nofollow - https://www.dropbox.com/sh/xsrwaeml8920idy/AABjiD5Y-edQ5EkwdcmHg7-Va?dl=0



Posted By: a.schoenle
Date Posted: 18 November 2018 at 5:16am
Try again.
https://www.dropbox.com/sh/xsrwaeml8920idy/AABjiD5Y-edQ5EkwdcmHg7-Va?dl=0" rel="nofollow - https://www.dropbox.com/sh/xsrwaeml8920idy/AABjiD5Y-edQ5EkwdcmHg7-Va?dl=0

18.6. now compiles with /permissive-. To apply go to the root folder and do
patch -p1 < path/to/patch/file.patch

For 18.5. the patch only makes the headers conforming and it is untested. The diff is done from "Sources", so you will have to go to root/Sources and do
patch -p1 < path/to/patch/file.patch
Also, you will have to add a line
struct IUnknown;
to stdafx.h before it pulls the windows headers.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net