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` in lambdas must be captured
> explicitly), it should not affect earlier C++ versions.

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:21: error: 
use of deleted function ‘std::basic_ostream<char, _Traits>& 
std::operator<<(std::basic_ostream<char, _Traits>&, wchar_t) [with _Traits = 
std::char_traits<char>]’
  373 |   os << t.character();

Clang gives the following:

[ 72%] Building CXX object src/mathed/CMakeFiles/mathed.dir/MathParser.cpp.o    
                                                                                
                                                   
cd /home/vbox/lyxbuilds/master-clang/CMakeBuild/src/mathed && /usr/bin/clang++  
-DBOOST_USER_CONFIG="<config.h>" -DHUNSPELL_STATIC -DQT_CORE_LIB 
-I/home/vbox/lyxbuilds/master-clang/CMakeBuild -I/home/vbox/lyxbui
lds/master-clang/repo/src -I/usr/include/enchant-2 
-I/home/vbox/lyxbuilds/master-clang/repo/3rdparty/hunspell/1.7.0/src/hunspell 
-I/home/vbox/lyxbuilds/master-clang/repo/3rdparty/hunspell/1.7.0/src 
-I/home/vbox/lyxbuilds/master-clang/repo/3rdparty/boost 
-I/home/vbox/lyxbuilds/master-clang/repo/3rdparty/nod 
-I/home/vbox/lyxbuilds/master-clang/repo/src/mathed -isystem 
/usr/include/x86_64-linux-gnu/qt5 -isystem /usr/inclu
de/x86_64-linux-gnu/qt5/QtCore -isystem 
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++  -Wall -Wextra 
-Wno-deprecated-copy --std=c++20 -Wno-deprecated-register -DENABLE_ASSERTIONS=1 
-D_GLIBCXX_DEBUG -D_GLIBCXX_
DEBUG_PEDANTIC -fno-strict-aliasing  -O0 -g3 -D_DEBUG   -Werror -fPIC 
-std=c++2a -o CMakeFiles/mathed.dir/MathParser.cpp.o -c 
/home/vbox/lyxbuilds/master-clang/repo/src/mathed/MathParser.cpp                
     
/home/vbox/lyxbuilds/master-clang/repo/src/mathed/MathParser.cpp:373:6: error: 
overload resolution selected deleted operator '<<'                              
                                                                    os << 
t.character();                                                                  
                                                                                
                             
                ~~ ^  ~~~~~~~~~~~~~                                             
                                                                                
                                                   
$ g++ --version
g++ (Ubuntu 10.2.0-13ubuntu1) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang++ --version
Ubuntu clang version 11.0.0-2
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to