Build error with RH9

Description

Some combination of Boost version and compiler version is failing on a combination of Boost's shared_ptr and lambda hackery that predates the standard. It seems to build on Windows, but could be something Boost patched in 1.76 or 1.77.

Failure is in EntityAttributesEntityMatcher.cpp source.

Environment

None

has dependent

Activity

Scott Cantor 
November 15, 2021 at 9:29 PM

Patch is

 

diff --git a/saml/saml2/metadata/impl/EntityAttributesEntityMatcher.cpp b/saml/saml2/metadata/impl/EntityAttributesEntityMatcher.cpp index bf24037..7a5ab47 100644 --- a/saml/saml2/metadata/impl/EntityAttributesEntityMatcher.cpp +++ b/saml/saml2/metadata/impl/EntityAttributesEntityMatcher.cpp @@ -127,11 +127,11 @@ bool EntityAttributesEntityMatcher::matches(const EntityDescriptor& entity) cons if (xo) { extFound = true; // If we find a matching tag, we win. Each tag is treated in OR fashion. - if (find_if(m_tags.begin(), m_tags.end(), - lambda::bind(&EntityAttributesEntityMatcher::_matches, this, dynamic_cast<const EntityAttributes*>(xo), - lambda::bind(&boost::shared_ptr<Attribute>::get, _1))) != m_tags.end()) { - return true; - } + for (vector<boost::shared_ptr<Attribute>>::const_iterator i = m_tags.begin(); i != m_tags.end(); ++i) { + if (_matches(dynamic_cast<const EntityAttributes*>(xo), i->get())) { + return true; + } + } } } @@ -144,11 +144,11 @@ bool EntityAttributesEntityMatcher::matches(const EntityDescriptor& entity) cons if (xo) { extFound = true; // If we find a matching tag, we win. Each tag is treated in OR fashion. - if (find_if(m_tags.begin(), m_tags.end(), - lambda::bind(&EntityAttributesEntityMatcher::_matches, this, dynamic_cast<const EntityAttributes*>(xo), - lambda::bind(&boost::shared_ptr<Attribute>::get, _1))) != m_tags.end()) { - return true; - } + for (vector<boost::shared_ptr<Attribute>>::const_iterator i = m_tags.begin(); i != m_tags.end(); ++i) { + if (_matches(dynamic_cast<const EntityAttributes*>(xo), i->get())) { + return true; + } + } } } group = dynamic_cast<EntitiesDescriptor*>(group->getParent());
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created November 15, 2021 at 9:11 PM
Updated November 16, 2021 at 3:20 PM
Resolved November 16, 2021 at 3:19 PM