Re: Compiling in C++20 mode

2020-12-31 Thread Scott Kostyshak
On Wed, Dec 30, 2020 at 09:50:47AM +0200, Yuriy Skalko wrote: > > (this one is a warning) > > /home/vbox/lyxbuilds/master-clang/repo/src/LyXRC.cpp:2950:28: error: > > comparison between two arrays is deprecated; to compare array addresses, > > use unary '+' to decay operands to pointers [-Werror,-

Re: Compiling in C++20 mode

2020-12-30 Thread Scott Kostyshak
On Wed, Dec 30, 2020 at 09:50:47AM +0200, Yuriy Skalko wrote: > > I used "-k" instead of "-k0" (my make version does not seem to support > > "-k0". I get the following errors with GCC: > > > > /home/vbox/lyxbuilds/master-clang/repo/src/tex2lyx/Parser.cpp:857:34: > > error: use of deleted function

Re: Compiling in C++20 mode

2020-12-29 Thread Yuriy Skalko
I used "-k" instead of "-k0" (my make version does not seem to support "-k0". I get the following errors with GCC: /home/vbox/lyxbuilds/master-clang/repo/src/tex2lyx/Parser.cpp:857:34: error: use of deleted function ‘std::basic_ostream& std::operator<<(std::basic_ostream&, wchar_t) [with

Re: Compiling in C++20 mode

2020-12-29 Thread Scott Kostyshak
On Tue, Dec 29, 2020 at 10:37:15PM +0200, Yuriy Skalko wrote: > > Thanks, Yuriy. I now get the following error with GCC: > > > > /home/vbox/lyxbuilds/master-clang/repo/src/Buffer.cpp:1774:27: error: > > use of deleted function ‘std::basic_ostream& > > std::operator<<(std::basic_ostream&, wchar_t)

Re: Compiling in C++20 mode

2020-12-29 Thread Scott Kostyshak
On Tue, Dec 29, 2020 at 10:37:15PM +0200, Yuriy Skalko wrote: > > Thanks, Yuriy. I now get the following error with GCC: > > > > /home/vbox/lyxbuilds/master-clang/repo/src/Buffer.cpp:1774:27: error: > > use of deleted function ‘std::basic_ostream& > > std::operator<<(std::basic_ostream&, wchar_t)

Re: Compiling in C++20 mode

2020-12-29 Thread Yuriy Skalko
Thanks, Yuriy. I now get the following error with GCC: /home/vbox/lyxbuilds/master-clang/repo/src/Buffer.cpp:1774:27: error: use of deleted function ‘std::basic_ostream& std::operator<<(std::basic_ostream&, wchar_t) [with _Traits = std::char_traits]’ 1774 | oss << "0x" << hex << e.failed_c

Re: Compiling in C++20 mode

2020-12-29 Thread Scott Kostyshak
On Tue, Dec 29, 2020 at 12:17:20PM +0200, Yuriy Skalko wrote: > > I'm not sure how this line compiled at all with earlier standards on > > Linux (where char_type is wchar_t). How wchar_t was outputted into char > > stream? > > It produced the integer value before C++20: > https://en.cppreference.c

Re: Compiling in C++20 mode

2020-12-29 Thread Yuriy Skalko
I'm not sure how this line compiled at all with earlier standards on Linux (where char_type is wchar_t). How wchar_t was outputted into char stream? It produced the integer value before C++20: https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt2 So, the patch attached here should w

Re: Compiling in C++20 mode

2020-12-29 Thread Yuriy Skalko
Thanks for working on this, Yuriy! I'm not sure if the following is helpful, but curent master fails for me with GCC and Clang with C++20 on Ubuntu 20.10. Here are details in case you or anyone else is motivated to take a look: /home/vbox/lyxbuilds/master-clang/repo/src/mathed/MathParser.cpp:373:

Re: Compiling in C++20 mode

2020-12-28 Thread Scott Kostyshak
On Mon, Dec 28, 2020 at 09:12:05PM +0200, Yuriy Skalko wrote: > > Tried at ab7ac800. At least it should be compilable with any c++ compiler. > > > > Kornel > > Now LyX can be successfully compiled with C++20 compiler. The attached patch > fixes C++20-specific deprecation warning (`this` i

Re: Compiling in C++20 mode

2020-12-28 Thread Richard Kimberly Heck
On 12/28/20 2:12 PM, Yuriy Skalko wrote: >> Tried at ab7ac800. At least it should be compilable with any c++ >> compiler. >> >>     Kornel > > Now LyX can be successfully compiled with C++20 compiler. The attached > patch fixes C++20-specific deprecation warning (`this` in lambdas must > be cap

Re: Compiling in C++20 mode

2020-12-28 Thread Yuriy Skalko
Tried at ab7ac800. At least it should be compilable with any c++ compiler. Kornel Now LyX can be successfully compiled with C++20 compiler. The attached patch fixes C++20-specific deprecation warning (`this` in lambdas must be captured explicitly), it should not affect earlier C++ ver

Re: Compiling in C++20 mode

2020-12-28 Thread Kornel Benko
Am Mon, 28 Dec 2020 12:08:00 +0200 schrieb Yuriy Skalko : > Recently I've had necessity to install latest stable GCC version 10.2 > that has C++20 support. So I didn't miss the opportunity to try > compiling LyX in C++20 mode too. > > The only compilation error is due to recent commit 2d2e2f1c6

Compiling in C++20 mode

2020-12-28 Thread Yuriy Skalko
Recently I've had necessity to install latest stable GCC version 10.2 that has C++20 support. So I didn't miss the opportunity to try compiling LyX in C++20 mode too. The only compilation error is due to recent commit 2d2e2f1c6d. These u8 string literals have incompatible type: accents["ha