Re: Patches to improve compatibility with modern C++ standard

2020-06-04 Thread Yu Jin
Am Do., 4. Juni 2020 um 15:22 Uhr schrieb Kornel Benko : > Am Thu, 4 Jun 2020 15:03:28 +0200 > schrieb Yu Jin : > > > Sorry for the trouble, I just updated Visual Studio to version 16.6.1 > > (always try to work with the latest software). My MVSC version according > to > > CMake is now 1926, and n

Re: Patches to improve compatibility with modern C++ standard

2020-06-04 Thread Kornel Benko
Am Thu, 4 Jun 2020 15:03:28 +0200 schrieb Yu Jin : > Am Di., 5. Mai 2020 um 13:49 Uhr schrieb Kornel Benko : > > > Am Tue, 5 May 2020 13:39:35 +0200 > > schrieb Yu Jin : > > > > > Am Di., 5. Mai 2020 um 13:10 Uhr schrieb Kornel Benko : > > > > > > > Am Tue, 5 May 2020 12:36:03 +0200 > > > > schri

Re: Patches to improve compatibility with modern C++ standard

2020-06-04 Thread Yu Jin
Am Di., 5. Mai 2020 um 13:49 Uhr schrieb Kornel Benko : > Am Tue, 5 May 2020 13:39:35 +0200 > schrieb Yu Jin : > > > Am Di., 5. Mai 2020 um 13:10 Uhr schrieb Kornel Benko : > > > > > Am Tue, 5 May 2020 12:36:03 +0200 > > > schrieb Yu Jin : > > > > > > > Am Di., 5. Mai 2020 um 09:16 Uhr schrieb Kor

Re: Patches to improve compatibility with modern C++ standard

2020-05-07 Thread Thibaut Cuvelier
On Wed, 6 May 2020 at 11:42, Kornel Benko wrote: > Am Tue, 5 May 2020 20:35:30 +0200 > schrieb Thibaut Cuvelier : > > > Well, it has a couple of different versions… > > The compiler itself: 19.2x., like 19.25.28614 > > The toolchain: 16.x.x, like 16.5.4 > > The _MSC_VER macro: 192x, like 1925

Re: Patches to improve compatibility with modern C++ standard

2020-05-06 Thread Kornel Benko
Am Tue, 5 May 2020 20:35:30 +0200 schrieb Thibaut Cuvelier : > Well, it has a couple of different versions… > The compiler itself: 19.2x., like 19.25.28614 > The toolchain: 16.x.x, like 16.5.4 > The _MSC_VER macro: 192x, like 1925 (it looks like the one used by CMake for > MSVC_VERSION) The _M

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Thibaut Cuvelier
At the very least, Boost 1.70 seems to do the job (unlike 1.68). So 1.72 is more than likely enough. Thibaut Cuvelier On Tue, 5 May 2020 at 22:19, Thibaut Cuvelier wrote: > I don't have access to master: the Git server is too slow for me to > download it (working at most at 10 kb/s); plus, my

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Pavel Sanda
On Tue, May 05, 2020 at 10:37:34PM +0200, Jean-Marc Lasgouttes wrote: > Le 05/05/2020 ?? 22:19, Thibaut Cuvelier a écrit : > >I don't have access to master: the Git server is too slow for me to > >download it (working at most at 10 kb/s); plus, my Internet access is > >disrupted (/tout le départeme

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Jean-Marc Lasgouttes
Le 05/05/2020 à 22:19, Thibaut Cuvelier a écrit : I don't have access to master: the Git server is too slow for me to download it (working at most at 10 kb/s); plus, my Internet access is disrupted (/tout le département du Val de Marne, apparemment…/), so my only access is 4G, like many people

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Thibaut Cuvelier
I don't have access to master: the Git server is too slow for me to download it (working at most at 10 kb/s); plus, my Internet access is disrupted (*tout le département du Val de Marne, apparemment…*), so my only access is 4G, like many people in the area… I highly suspect that this version is goo

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Jean-Marc Lasgouttes
Le 05/05/2020 à 21:22, Thibaut Cuvelier a écrit : No, nothing requires C++20, it's just that VC19 is not C++11-compliant enough when set in C++11 mode to build LyX, you have to enable C++17 to enable some features like designated initialiser, if my memory serves me right. Thanks, I understand

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Thibaut Cuvelier
No, nothing requires C++20, it's just that VC19 is not C++11-compliant enough when set in C++11 mode to build LyX, you have to enable C++17 to enable some features like designated initialiser, if my memory serves me right. Thibaut Cuvelier On Tue, 5 May 2020 at 21:07, Jean-Marc Lasgouttes wrote

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Jean-Marc Lasgouttes
Le 05/05/2020 à 13:02, Kornel Benko a écrit : As Thibaut needs /std:c++20, we have to check if it is valid flag. This is where our interpretation diverges. Thibaut, could you clarify the situation about C++20 again? If your code requires C++20 we will sooner or later be in a bad position, won

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Thibaut Cuvelier
Well, it has a couple of different versions… The compiler itself: 19.2x., like 19.25.28614 The toolchain: 16.x.x, like 16.5.4 The _MSC_VER macro: 192x, like 1925 (it looks like the one used by CMake for MSVC_VERSION) The _MSC_FULL_VER: 192xx, like 192027508 Thibaut Cuvelier On Tue, 5 May

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Kornel Benko
Am Tue, 5 May 2020 13:39:35 +0200 schrieb Yu Jin : > Am Di., 5. Mai 2020 um 13:10 Uhr schrieb Kornel Benko : > > > Am Tue, 5 May 2020 12:36:03 +0200 > > schrieb Yu Jin : > > > > > Am Di., 5. Mai 2020 um 09:16 Uhr schrieb Kornel Benko : > > > > > > > Am Tue, 5 May 2020 09:15:50 +0200 > > > > schri

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Yu Jin
Am Di., 5. Mai 2020 um 13:10 Uhr schrieb Kornel Benko : > Am Tue, 5 May 2020 12:36:03 +0200 > schrieb Yu Jin : > > > Am Di., 5. Mai 2020 um 09:16 Uhr schrieb Kornel Benko : > > > > > Am Tue, 5 May 2020 09:15:50 +0200 > > > schrieb Kornel Benko : > > > > Thanks Eugene. Please try the next patch. >

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Kornel Benko
Am Tue, 5 May 2020 12:36:03 +0200 schrieb Yu Jin : > Am Di., 5. Mai 2020 um 09:16 Uhr schrieb Kornel Benko : > > > Am Tue, 5 May 2020 09:15:50 +0200 > > schrieb Kornel Benko : > > > Thanks Eugene. Please try the next patch. > > > If it also does not work, we have to decide on the msvc version > >

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Kornel Benko
Am Tue, 5 May 2020 12:43:33 +0200 schrieb Jean-Marc Lasgouttes : > Le 05/05/2020 à 12:36, Yu Jin a écrit : > > Still same errors, unary_function was removed in the newer c++ > > standards, and the patch sets language standard to latest (Vorschau – > > Features aus dem aktuellen C++-Arbeitsentwur

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Jean-Marc Lasgouttes
Le 05/05/2020 à 12:36, Yu Jin a écrit : Still same errors, unary_function was removed in the newer c++ standards, and the patch sets language standard to latest (Vorschau – Features aus dem aktuellen C++-Arbeitsentwurf (/std:c++latest)) for me, where it's just "standard" whithout it. I attached

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Yu Jin
Am Di., 5. Mai 2020 um 09:16 Uhr schrieb Kornel Benko : > Am Tue, 5 May 2020 09:15:50 +0200 > schrieb Kornel Benko : > > Thanks Eugene. Please try the next patch. > > If it also does not work, we have to decide on the msvc version > > what to do. > > > > Could you also check the msvc-version (some

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Kornel Benko
Am Tue, 5 May 2020 09:15:50 +0200 schrieb Kornel Benko : > Am Tue, 5 May 2020 08:34:48 +0200 > schrieb Yu Jin : > > > > Eugene, could you please test the patch? > > > Hmm, patch does not work for me, I get these errors: > > Thanks Eugene. Please try the next patch. > If it also does not work,

Re: Patches to improve compatibility with modern C++ standard

2020-05-05 Thread Kornel Benko
Am Tue, 5 May 2020 08:34:48 +0200 schrieb Yu Jin : > > Eugene, could you please test the patch? > > Hmm, patch does not work for me, I get these errors: Thanks Eugene. Please try the next patch. If it also does not work, we have to decide on the msvc version what to do. Could you also check the

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Yu Jin
Am Mo., 4. Mai 2020 um 16:04 Uhr schrieb Kornel Benko : > Am Mon, 4 May 2020 15:33:02 +0200 > schrieb Thibaut Cuvelier : > > > Yes, your patch works (MSVC 19, again, that's all I have on my computer). > > > > By the way, in my original email, there are modifications to Boost, but > it > > would be

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Thibaut Cuvelier
Thanks! Thibaut Cuvelier On Tue, 5 May 2020 at 01:47, Richard Kimberly Heck wrote: > On 5/4/20 7:18 PM, Richard Kimberly Heck wrote: > > On 5/4/20 4:16 PM, Thibaut Cuvelier wrote: > >> I changed the code to use more often the ::find() functions and > >> similar. In TextClass, I had to add new

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Richard Kimberly Heck
On 5/4/20 7:18 PM, Richard Kimberly Heck wrote: > On 5/4/20 4:16 PM, Thibaut Cuvelier wrote: >> I changed the code to use more often the ::find() functions and >> similar. In TextClass, I had to add new methods. That's the included >> patch, which replaces two of the previous patches. > > Thanks. T

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Richard Kimberly Heck
On 5/4/20 4:16 PM, Thibaut Cuvelier wrote: > That's a lot of emails :)! > > I hereby grant permission to use my contributions to LyX under the GPL > license version 2 or later. Thanks. > Code with std::unary_function is still valid in C++11, but became > deprecated in this version (and deleted w

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Thibaut Cuvelier
That's a lot of emails :)! I hereby grant permission to use my contributions to LyX under the GPL license version 2 or later. Code with std::unary_function is still valid in C++11, but became deprecated in this version (and deleted with C++17). VC has not exactly been known for standards complian

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Richard Kimberly Heck
On 5/4/20 2:09 PM, Jean-Marc Lasgouttes wrote: > Le 04/05/2020 à 06:05, Thibaut Cuvelier a écrit : >> Dear list, > > Dear Thibaut, > >> During my work on DocBook (which started at >> www.lyx.org/trac/ticket/8444 ), >> I switched to Visual C++ 2019 as a compiler.

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Richard Kimberly Heck
On 5/4/20 12:05 AM, Thibaut Cuvelier wrote: > Dear list, > > During my work on DocBook (which started at > www.lyx.org/trac/ticket/8444 ), I > switched to Visual C++ 2019 as a compiler. The only way I found to > make it compile large parts of LyX was to switch t

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Richard Kimberly Heck
On 5/4/20 1:47 PM, Thibaut Cuvelier wrote: > No, it's not necessary, but I felt it was needed to keep some > consistency in the code. Seems reasonable. I've done that, too. Also fixed the missing include. Riki > > > On Mon, 4 May 2020 at 19:45, Richard Kimberly Heck >

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Jean-Marc Lasgouttes
Le 04/05/2020 à 15:33, Thibaut Cuvelier a écrit : Yes, your patch works (MSVC 19, again, that's all I have on my computer). By the way, in my original email, there are modifications to Boost, but it would be better to update it to a more recent version. The needed patch was integrated nine mon

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Jean-Marc Lasgouttes
Le 04/05/2020 à 06:05, Thibaut Cuvelier a écrit : Dear list, Dear Thibaut, During my work on DocBook (which started at www.lyx.org/trac/ticket/8444 ), I switched to Visual C++ 2019 as a compiler. The only way I found to make it compile large parts of LyX

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Thibaut Cuvelier
No, it's not necessary, but I felt it was needed to keep some consistency in the code. Thibaut Cuvelier On Mon, 4 May 2020 at 19:45, Richard Kimberly Heck wrote: > On 5/4/20 12:05 AM, Thibaut Cuvelier wrote: > > One of the largest changes is due to the addition of requires to the > > list of k

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Richard Kimberly Heck
On 5/4/20 12:05 AM, Thibaut Cuvelier wrote: > One of the largest changes is due to the addition of requires to the > list of keywords, which is currently replaced by requirements, which > is close in meaning. Most of these have been fixed, and I think I just fixed the rest. I don't see a clang wa

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Kornel Benko
Am Mon, 4 May 2020 15:33:02 +0200 schrieb Thibaut Cuvelier : > Yes, your patch works (MSVC 19, again, that's all I have on my computer). > > By the way, in my original email, there are modifications to Boost, but it > would be better to update it to a more recent version. The needed patch was > i

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Thibaut Cuvelier
Yes, your patch works (MSVC 19, again, that's all I have on my computer). By the way, in my original email, there are modifications to Boost, but it would be better to update it to a more recent version. The needed patch was integrated nine months ago. Thibaut Cuvelier On Mon, 4 May 2020 at 14:

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Kornel Benko
Am Mon, 4 May 2020 12:53:42 +0200 schrieb Thibaut Cuvelier : > You can use the equivalent parameter /std: > https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019 > > Example: cl /std:c++14. If the standard is not supported, you get the warning >

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Thibaut Cuvelier
You can use the equivalent parameter /std: https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019 Example: cl /std:c++14. If the standard is not supported, you get the warning D9002. Thibaut Cuvelier On Mon, 4 May 2020 at 11:34, Kornel Benko wro

Re: Patches to improve compatibility with modern C++ standard

2020-05-04 Thread Kornel Benko
Am Mon, 4 May 2020 06:05:51 +0200 schrieb Thibaut Cuvelier : > Dear list, > > During my work on DocBook (which started at www.lyx.org/trac/ticket/8444), > I switched to Visual C++ 2019 as a compiler. The only way I found to make > it compile large parts of LyX was to switch to recent C++ standard

Patches to improve compatibility with modern C++ standard

2020-05-03 Thread Thibaut Cuvelier
Dear list, During my work on DocBook (which started at www.lyx.org/trac/ticket/8444), I switched to Visual C++ 2019 as a compiler. The only way I found to make it compile large parts of LyX was to switch to recent C++ standards, so that all features are available. Unfortunately, some deprecated pa