Patches to improve compatibility with modern C++ standard

Richard Kimberly Heck rikiheck at lyx.org
Mon May 4 18:42:06 UTC 2020


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 <http://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 parts of C++ have been removed in the latest versions of
> the standard… These changes are probably not required for now with
> other compilers, but some form will be required in the future when
> switching to newer C++ versions.

I think I have some questions here similar to Kornel's. For example, this

diff --git a/src/BranchList.cpp b/src/BranchList.cpp
index 9c0078b316..22e78fb9dc 100644
--- a/src/BranchList.cpp
+++ b/src/BranchList.cpp
@@ -27,7 +27,7 @@ namespace lyx {
 
 namespace {
 
-class BranchNamesEqual : public std::unary_function<Branch, bool>
+class BranchNamesEqual
 {
 public:
     BranchNamesEqual(docstring const & name)

works fine here, wiht gcc 9.3.1, but I have no idea how to test with
other compilers. At the moment, I think we are requiring C++11 for
2.4.x, so I would guess that was fine.

Riki


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200504/82ce7d05/attachment-0001.html>


More information about the lyx-devel mailing list