It turns out the RHEL and CentOS 7 STL definition does not quite match
up to official documentation of what their GCC version supports. In
particular the use of const_iterator on std::list containers.
Use auto instead of an explicit iterator. Allowing the compiler to select
whichever iterator is available and will work.
bool
ACLMethodData::match(HttpRequestMethod toFind)
{
- for (std::list<HttpRequestMethod>::const_iterator i = values.begin(); i != values.end(); ++i) {
+ for (auto i = values.begin(); i != values.end(); ++i) {
if (*i == toFind) {
// tune the list for LRU ordering
values.erase(i);
bool
ACLProtocolData::match(AnyP::ProtocolType toFind)
{
- for (std::list<AnyP::ProtocolType>::const_iterator itr = values.begin(); itr != values.end(); ++itr) {
+ for (auto itr = values.begin(); itr != values.end(); ++itr) {
if (*itr == toFind) {
// tune the list for LRU ordering
values.erase(itr);