git-svn-id: https://svn.shibboleth.net/cpp-opensaml/branches/REL_2@688
fb386ef7-a10c-0410-8ebf-
fd3f8e989ab0
#include <saml/base.h>
#include <string>
#include <saml/base.h>
#include <string>
#include <xercesc/dom/DOM.hpp>
namespace xmltooling {
#include <xercesc/dom/DOM.hpp>
namespace xmltooling {
#include <ctime>
#include <vector>
#include <ctime>
#include <vector>
#include <xmltooling/unicode.h>
#if defined (_MSC_VER)
#include <xmltooling/unicode.h>
#if defined (_MSC_VER)
#include "exceptions.h"
#include "binding/SecurityPolicyRule.h"
#include "exceptions.h"
#include "binding/SecurityPolicyRule.h"
#include <xmltooling/logging.h>
#include <xmltooling/QName.h>
#include <xmltooling/XMLObject.h>
#include <xmltooling/logging.h>
#include <xmltooling/QName.h>
#include <xmltooling/XMLObject.h>
Lock lock(m_credentialLock.get());
const credmap_t::mapped_type& creds = resolveCredentials(metacrit->getRole());
Lock lock(m_credentialLock.get());
const credmap_t::mapped_type& creds = resolveCredentials(metacrit->getRole());
- // Indirect iterator derefs the pointers in the vector to pass to the matches() method by reference.
- credmap_t::mapped_type::const_iterator c = find_if(
- creds.begin(), creds.end(), lambda::bind(&CredentialCriteria::matches, metacrit, boost::ref(*_1))
- );
- if (c != creds.end())
- return *c;
- return nullptr;
+ for (credmap_t::mapped_type::const_iterator c = creds.begin(); c!=creds.end(); ++c)
+ if (metacrit->matches(*(*c)))
+ return *c;
+return nullptr;
}
vector<const Credential*>::size_type AbstractMetadataProvider::resolve(
}
vector<const Credential*>::size_type AbstractMetadataProvider::resolve(
Lock lock(m_credentialLock.get());
const credmap_t::mapped_type& creds = resolveCredentials(metacrit->getRole());
Lock lock(m_credentialLock.get());
const credmap_t::mapped_type& creds = resolveCredentials(metacrit->getRole());
- // Add matching creds to results array.
- static void (vector<const Credential*>::* push_back)(const Credential* const &) = &vector<const Credential*>::push_back;
- for_each(
- creds.begin(), creds.end(),
- if_(lambda::bind(&CredentialCriteria::matches, metacrit, boost::ref(*_1)))[lambda::bind(push_back, boost::ref(results), _1)]
- );
-
+ for (credmap_t::mapped_type::const_iterator c = creds.begin(); c!=creds.end(); ++c)
+ if (metacrit->matches(*(*c)))
+ results.push_back(*c);