--std=c++11 fails on master

Yuriy Skalko yuriy.skalko at gmail.com
Sun Oct 25 23:02:38 UTC 2020


>> On Sun, Oct 25, 2020 at 08:49:05AM +0100, Jean-Marc Lasgouttes wrote:
>> > Le 25 octobre 2020 07:15:17 GMT+01:00, Scott Kostyshak <skost... at lyx.org> a 
>> > écrit :
>> > >Do we require c++14 now? If I force --std=c++11 I get errors.
>> > 
>> > 
>> > It is supposed to work with c++11. What are the errors?
>> 
>> [ 25%] Building CXX object 
>> src/support/CMakeFiles/support.dir/FileMonitor.cpp.o
>> cd /home/scott/lyxbuilds/temp/CMakeBuild/src/support && /usr/bin/c++  
>> -DBOOST_USER_CONFIG="<config.h>" -DHUNSPELL_STATIC -DQT_CORE_LIB -DQT_GUI_LIB 
>> -I/home/scott/lyxbuilds/temp/CMakeBuild -I/home/scott/lyxbuilds/temp/repo/src 
>> -I/usr/include/enchant 
>> -I/home/scott/lyxbuilds/temp/repo/3rdparty/hunspell/1.7.0/src/hunspell 
>> -I/home/scott/lyxbuilds/temp/repo/3rdparty/hunspell/1.7.0/src 
>> -I/home/scott/lyxbuilds/temp/repo/3rdparty/boost 
>> -I/home/scott/lyxbuilds/temp/repo/src/support 
>> -I/home/scott/lyxbuilds/temp/CMakeBuild/src/support -isystem 
>> /usr/include/x86_64-linux-gnu/qt5 -isystem 
>> /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem 
>> /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem 
>> /usr/include/x86_64-linux-gnu/qt5/QtGui  -Wall -Wunused-parameter  
>> -DENABLE_ASSERTIONS=1 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC 
>> -fno-strict-aliasing  -O0 -g3 -D_DEBUG   -fPIC -std=c++11 -o 
>> CMakeFiles/support.dir/FileMonitor.cpp.o -c 
>> /home/scott/lyxbuilds/temp/repo/src/support/FileMonitor.cpp
>> In file included from 
>> /home/scott/lyxbuilds/temp/repo/src/support/FileMonitor.cpp:19:
>> /home/scott/lyxbuilds/temp/repo/src/support/unique_ptr.h:24:28: error: 
>> ???std::make_unique??? has not been declared
>>    24 | namespace lyx { using std::make_unique; }
> 
> 
> Sounds like missing include due to the recent headers cleanup.. P

I think this error has different cause.

Looking into support/unique_ptr.h:

.......

#ifdef HAVE_DEF_MAKE_UNIQUE

namespace lyx { using std::make_unique; }

#else

.......

This conditional compilation branch should be compiled only for active 
HAVE_DEF_MAKE_UNIQUE that should be correctly set by build system since 
`std::make_unique` appeared only in C++14.

Scott, could you check this value in your config.h when compiling in 
C++11 mode? it should be inactive.

Yuriy


More information about the lyx-devel mailing list