From d4cf702259ef8dd4aad95c9c7d15d318712a59fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 14 Apr 2024 11:53:43 +0200 Subject: [PATCH] Fix compatibility with C++17. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/entry.h | 2 +- src/rtf2html/rtf_table.cpp | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/entry.h b/src/entry.h index a08f8fc..2293bd0 100644 --- a/src/entry.h +++ b/src/entry.h @@ -239,7 +239,7 @@ private: PtrVector m_groups; }; -class EntryCmp : public std::binary_function { +class EntryCmp : public std::function { public: EntryCmp(const TQString& field) : m_field(field) {} diff --git a/src/rtf2html/rtf_table.cpp b/src/rtf2html/rtf_table.cpp index b5cdf7b..9126844 100644 --- a/src/rtf2html/rtf_table.cpp +++ b/src/rtf2html/rtf_table.cpp @@ -106,8 +106,9 @@ std::string table::make() cell_def_2= std::find_if((*span_row)->CellDefs->begin(), (*span_row)->CellDefs->end(), - std::bind2nd( - std::mem_fun(&table_cell_def::right_equals), + std::bind( + std::mem_fn(&table_cell_def::right_equals), + std::placeholders::_1, (*cell_def)->Right)); if (cell_def_2==(*span_row)->CellDefs->end()) break; @@ -157,8 +158,9 @@ std::string table::make() cell_def_2= std::find_if((*row2)->CellDefs->begin(), (*row2)->CellDefs->end(), - std::bind2nd( - std::mem_fun(&table_cell_def::right_equals), + std::bind( + std::mem_fn(&table_cell_def::right_equals), + std::placeholders::_1, left)); if (cell_def_2!=(*row2)->CellDefs->end()) { @@ -167,8 +169,9 @@ std::string table::make() cell_def_2= std::find_if((*row2)->CellDefs->begin(), (*row2)->CellDefs->end(), - std::bind2nd( - std::mem_fun(&table_cell_def::left_equals), + std::bind( + std::mem_fn(&table_cell_def::left_equals), + std::placeholders::_1, right)); if (cell_def_2!=(*row2)->CellDefs->end()) {