Skip to content

Commit

Permalink
Replace the deprecated bind2nd with a lambda
Browse files Browse the repository at this point in the history
No need to use ptr_fun anymore.
  • Loading branch information
giacomini committed Oct 1, 2024
1 parent 8be8615 commit 1b29270
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/server/vomsd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1137,9 +1137,9 @@ bool VOMSServer::makeAC(vomsresult& vr, EVP_PKEY *key, X509 *issuer,
if (!existing.empty())
{
LOGM(VARP, logh, LEV_DEBUG, T_PRE, "User comes with valid fqans for this VO. Computing fqans intersection.");
if (fqans.erase(remove_if(fqans.begin(),
fqans.end(),
bind2nd(std::ptr_fun(not_in), existing)),
if (fqans.erase(std::remove_if(fqans.begin(),
fqans.end(),
[&](std::string const& s) { return not_in(s, existing); }),
fqans.end()) != fend)
{
LOGM(VARP, logh, LEV_DEBUG, T_PRE, "Only a subset of the requested attributes will be returned.");
Expand All @@ -1151,8 +1151,8 @@ bool VOMSServer::makeAC(vomsresult& vr, EVP_PKEY *key, X509 *issuer,
{

LOGM(VARP, logh, LEV_DEBUG, T_PRE, "Dropping generic attributes for fqans which cannot be issued for current request.");
attribs.erase(remove_if(attribs.begin(), attribs.end(),
bind2nd(std::ptr_fun(checkinside), fqans)),
attribs.erase(std::remove_if(attribs.begin(), attribs.end(),
[&](gattrib const& a) { return checkinside(a, fqans); }),
attribs.end());
}

Expand Down

0 comments on commit 1b29270

Please sign in to comment.