From f0c3526a6cefacc581003e9e5d13c6df02b7613a Mon Sep 17 00:00:00 2001 From: "Tod D. Romo" Date: Tue, 23 Jan 2024 13:16:50 -0500 Subject: [PATCH] Removing std::binary_function() since it is deprecated in c++17 and beyond --- Tools/fcontacts.cpp | 2 +- src/Atom.hpp | 4 ++-- src/AtomicGroup.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/fcontacts.cpp b/Tools/fcontacts.cpp index 8db5b27a1..509de40d4 100644 --- a/Tools/fcontacts.cpp +++ b/Tools/fcontacts.cpp @@ -174,7 +174,7 @@ class ToolOptions : public opts::OptionsPackage // Check for atom equality only through atomid... -struct IdEquals : public binary_function +struct IdEquals { bool operator()(const pAtom& a, const pAtom& b) const { diff --git a/src/Atom.hpp b/src/Atom.hpp index f68dbcdf6..8fa826076 100644 --- a/src/Atom.hpp +++ b/src/Atom.hpp @@ -282,7 +282,7 @@ namespace loos { #if !defined(SWIG) //! Compares two atoms based solely on name, id, resid, resname, and segid - struct AtomEquals : public std::binary_function { + struct AtomEquals { bool operator()(const pAtom& a, const pAtom& b) const; }; @@ -291,7 +291,7 @@ namespace loos { /** * The default distance threshold is 1e-3 Angstroms */ - struct AtomCoordsEquals : public std::binary_function { + struct AtomCoordsEquals { AtomCoordsEquals(const double d) : threshold(d*d) { } AtomCoordsEquals() : threshold(1e-6) { } diff --git a/src/AtomicGroup.hpp b/src/AtomicGroup.hpp index 6d159e0e1..628ad67b9 100644 --- a/src/AtomicGroup.hpp +++ b/src/AtomicGroup.hpp @@ -256,7 +256,7 @@ namespace loos * * Or as another example, comparing only residue numbers... * \code - * struct ResidEquals : public std::binary_function { + * struct ResidEquals { * bool operator()(const pAtom& a, const pAtom& b) { return(a.resid() == b.resid()); } * }; *