diff --git a/Code/DataStructs/MultiFPBReader.cpp b/Code/DataStructs/MultiFPBReader.cpp index 9aed04cbd50..06599c73952 100644 --- a/Code/DataStructs/MultiFPBReader.cpp +++ b/Code/DataStructs/MultiFPBReader.cpp @@ -29,8 +29,8 @@ std::uint8_t *bitsetToBytes(const boost::dynamic_bitset<> &bitset); namespace { struct tplSorter - : public std::binary_function { + : public std::function { bool operator()(const MultiFPBReader::ResultTuple &v1, const MultiFPBReader::ResultTuple &v2) const { if (v1.get<0>() == v2.get<0>()) { @@ -45,8 +45,8 @@ struct tplSorter } }; struct pairSorter - : public std::binary_function, - std::pair, bool> { + : public std::function, /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ + std::pair)> { bool operator()(const std::pair &v1, const std::pair &v2) const { if (v1.first == v2.first) { diff --git a/Code/GraphMol/Canon.cpp b/Code/GraphMol/Canon.cpp index 6d83b20547b..0bf392c304e 100644 --- a/Code/GraphMol/Canon.cpp +++ b/Code/GraphMol/Canon.cpp @@ -81,7 +81,7 @@ bool chiralAtomNeedsTagInversion(const RDKit::ROMol &mol, } struct _possibleCompare - : public std::binary_function { + : public std::function { /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ bool operator()(const PossibleType &arg1, const PossibleType &arg2) const { return (arg1.get<0>() < arg2.get<0>()); } diff --git a/Code/GraphMol/DistGeomHelpers/BoundsMatrixBuilder.cpp b/Code/GraphMol/DistGeomHelpers/BoundsMatrixBuilder.cpp index 3abc2b95268..98839de552c 100644 --- a/Code/GraphMol/DistGeomHelpers/BoundsMatrixBuilder.cpp +++ b/Code/GraphMol/DistGeomHelpers/BoundsMatrixBuilder.cpp @@ -335,7 +335,7 @@ void _setRingAngle(Atom::HybridizationType aHyb, unsigned int ringSize, } } -struct lessVector : public std::binary_function { +struct lessVector : public std::function { /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ bool operator()(const INT_VECT &v1, const INT_VECT &v2) const { return v1.size() < v2.size(); } diff --git a/Code/GraphMol/FindRings.cpp b/Code/GraphMol/FindRings.cpp index dad1980601d..749a88902e8 100644 --- a/Code/GraphMol/FindRings.cpp +++ b/Code/GraphMol/FindRings.cpp @@ -203,7 +203,7 @@ void findSSSRforDupCands(const ROMol &mol, VECT_INT_VECT &res, } // end of loop over all set of duplicate candidates } -struct compRingSize : public std::binary_function { +struct compRingSize : public std::function { /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ bool operator()(const INT_VECT &v1, const INT_VECT &v2) const { return v1.size() < v2.size(); } diff --git a/Code/RDGeneral/Ranking.h b/Code/RDGeneral/Ranking.h index 5f5a194a8f8..6050fd5857d 100644 --- a/Code/RDGeneral/Ranking.h +++ b/Code/RDGeneral/Ranking.h @@ -28,7 +28,7 @@ namespace Rankers { // compared. template struct pairGreater - : public std::binary_function, std::pair, bool> { + : public std::function, std::pair) > { /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ bool operator()(const std::pair &v1, const std::pair &v2) const { return v1.first > v2.first; @@ -39,7 +39,7 @@ struct pairGreater // compared. template struct pairLess - : public std::binary_function, std::pair, bool> { + : public std::function, std::pair ) > { /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ bool operator()(const std::pair &v1, const std::pair &v2) const { return v1.first < v2.first; @@ -47,9 +47,9 @@ struct pairLess }; template -class argless : public std::binary_function { +class argless : public std::function { /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ public: - argless(const T &c) : std::binary_function(), container(c){}; + argless(const T &c) : std::function(), container(c){}; /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ bool operator()(unsigned int v1, unsigned int v2) const { return container[v1] < container[v2]; } diff --git a/Code/RDGeneral/hash/extensions.hpp b/Code/RDGeneral/hash/extensions.hpp index a438928cff6..e04a6c056c5 100644 --- a/Code/RDGeneral/hash/extensions.hpp +++ b/Code/RDGeneral/hash/extensions.hpp @@ -66,7 +66,7 @@ namespace gboost #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct hash - : std::unary_function + : std::function /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ { #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) std::hash_result_t operator()(T const& val) const @@ -83,7 +83,7 @@ namespace gboost #if BOOST_WORKAROUND(__DMC__, <= 0x848) template struct hash - : std::unary_function + : std::function /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ { std::hash_result_t operator()(const T* val) const { @@ -110,7 +110,7 @@ namespace gboost { template struct inner - : std::unary_function + : std::function /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ { #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) std::hash_result_t operator()(T const& val) const @@ -136,7 +136,7 @@ namespace gboost { template struct inner - : public std::unary_function + : public std::function /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ { std::hash_result_t operator()(T const& val) const { @@ -155,7 +155,7 @@ namespace gboost { template struct inner - : public std::unary_function + : public std::function /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ { std::hash_result_t operator()(T& val) const { diff --git a/Code/RDGeneral/hash/hash.hpp b/Code/RDGeneral/hash/hash.hpp index 57c056e33df..d7fb5dafe0a 100644 --- a/Code/RDGeneral/hash/hash.hpp +++ b/Code/RDGeneral/hash/hash.hpp @@ -372,9 +372,11 @@ namespace gboost // #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +/*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ #define BOOST_HASH_SPECIALIZE(type) \ template <> struct hash \ - : public std::unary_function \ + : public std::function \ { \ std::hash_result_t operator()(type v) const \ { \ @@ -382,9 +384,10 @@ namespace gboost } \ }; +/*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ #define BOOST_HASH_SPECIALIZE_REF(type) \ template <> struct hash \ - : public std::unary_function \ + : public std::function \ { \ std::hash_result_t operator()(type const& v) const \ { \ @@ -392,9 +395,11 @@ namespace gboost } \ }; #else + +/*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ #define BOOST_HASH_SPECIALIZE(type) \ template <> struct hash \ - : public std::unary_function \ + : public std::function \ { \ std::hash_result_t operator()(type v) const \ { \ @@ -403,7 +408,7 @@ namespace gboost }; \ \ template <> struct hash \ - : public std::unary_function \ + : public std::function \ { \ std::hash_result_t operator()(const type v) const \ { \ @@ -411,9 +416,10 @@ namespace gboost } \ }; +/*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ #define BOOST_HASH_SPECIALIZE_REF(type) \ template <> struct hash \ - : public std::unary_function \ + : public std::function \ { \ std::hash_result_t operator()(type const& v) const \ { \ @@ -422,7 +428,7 @@ namespace gboost }; \ \ template <> struct hash \ - : public std::unary_function \ + : public std::function \ { \ std::hash_result_t operator()(type const& v) const \ { \ @@ -455,7 +461,7 @@ namespace gboost #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct hash - : public std::unary_function + : public std::function /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ { std::hash_result_t operator()(T* v) const { @@ -480,7 +486,7 @@ namespace gboost { template struct inner - : public std::unary_function + : public std::function /*Modified for Rosetta CXX17 compatibility. Resolve merge conflicts in favour of the primary RDKit repository. VKM, 24 May 2024.*/ { std::hash_result_t operator()(T val) const {