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) {