From 9593ce33c14b7ff535d113f8a825f4c42ca81912 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Wed, 25 Nov 2015 12:49:31 +0100 Subject: [PATCH 1/1] Replace idx_is_not functor by a C++11 lambda. --- ginac/indexed.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ginac/indexed.cpp b/ginac/indexed.cpp index 55c9768d..d5f7bf85 100644 --- a/ginac/indexed.cpp +++ b/ginac/indexed.cpp @@ -243,12 +243,6 @@ bool indexed::info(unsigned inf) const return inherited::info(inf); } -struct idx_is_not : public std::binary_function { - bool operator() (const ex & e, unsigned inf) const { - return !(ex_to(e).get_value().info(inf)); - } -}; - bool indexed::all_index_values_are(unsigned inf) const { // No indices? Then no property can be fulfilled @@ -256,7 +250,8 @@ bool indexed::all_index_values_are(unsigned inf) const return false; // Check all indices - return find_if(seq.begin() + 1, seq.end(), bind2nd(idx_is_not(), inf)) == seq.end(); + return find_if(seq.begin() + 1, seq.end(), + [inf](const ex & e) { return !(ex_to(e).get_value().info(inf)); }) == seq.end(); } int indexed::compare_same_type(const basic & other) const -- 2.44.0