From f3efbe2dd736b521068aa8683fa537b0f258984c Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Mon, 20 Jan 2020 00:57:07 +0100 Subject: [PATCH] Replace c++17 removed classes with c++11 replacements --- gtsam/base/Testable.h | 4 ++-- gtsam/linear/Errors.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gtsam/base/Testable.h b/gtsam/base/Testable.h index 73fb320e1..92c464940 100644 --- a/gtsam/base/Testable.h +++ b/gtsam/base/Testable.h @@ -107,7 +107,7 @@ namespace gtsam { * Template to create a binary predicate */ template - struct equals : public std::binary_function { + struct equals : public std::function { double tol_; equals(double tol = 1e-9) : tol_(tol) {} bool operator()(const V& expected, const V& actual) { @@ -119,7 +119,7 @@ namespace gtsam { * Binary predicate on shared pointers */ template - struct equals_star : public std::binary_function&, const boost::shared_ptr&, bool> { + struct equals_star : public std::function&, const boost::shared_ptr&)> { double tol_; equals_star(double tol = 1e-9) : tol_(tol) {} bool operator()(const boost::shared_ptr& expected, const boost::shared_ptr& actual) { diff --git a/gtsam/linear/Errors.cpp b/gtsam/linear/Errors.cpp index 42164d540..3fe2f3307 100644 --- a/gtsam/linear/Errors.cpp +++ b/gtsam/linear/Errors.cpp @@ -43,7 +43,7 @@ void Errors::print(const std::string& s) const { } /* ************************************************************************* */ -struct equalsVector : public std::binary_function { +struct equalsVector : public std::function { double tol_; equalsVector(double tol = 1e-9) : tol_(tol) {} bool operator()(const Vector& expected, const Vector& actual) {