]> git.lyx.org Git - features.git/commit
Fix compilation with gcc 4.9
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Nov 2022 16:43:22 +0000 (17:43 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 16 Nov 2022 16:49:52 +0000 (17:49 +0100)
commit94e7421a0a408bf60077bffe5d6f70142c5dad3f
tree91aa5b86023e2f1da31ee039d4c6593ef922f3f4
parent12bff77722205bdec4e78236bd6d8c75e818e717
Fix compilation with gcc 4.9

It appears that gcc 4.9 does not implement the following part of C++11:
https://cplusplus.github.io/CWG/issues/1148.html

Therefore, we have to use a special case in C++11 mode that does an
explicit std:move.

With recent compilers (gcc >= 9), this leads in C++11 mode to a warning:

MetricsInfo.cpp: In member function ‘lyx::Changer lyx::MetricsBase::changeFontSet(const string&)’:
../../master/src/MetricsInfo.cpp:83:13: warning: redundant move in return statement [-Wredundant-move]
   83 |  return move(rc);
      |         ~~~~^~~~
MetricsInfo.cpp:83:13: note: remove ‘std::move’ call

Partly reverts commit fff28c57.
src/MetricsInfo.cpp