make wml_tag::iterator
copy assignable (#8174)
This makes iterators based on this class to meet LegacyInputIterator requirements, allowing them to be used with STL algorithms such as MSVC's `std::find_if`.
This commit is contained in:
parent
508c627543
commit
61b2e8eb4f
1 changed files with 3 additions and 2 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -59,7 +60,7 @@ private:
|
|||
{
|
||||
std::queue<const wml_tag*> condition_queue;
|
||||
typename Map::const_iterator current;
|
||||
const config& match;
|
||||
std::reference_wrapper<const config> match;
|
||||
public:
|
||||
// Construct a begin iterator
|
||||
iterator(const wml_tag& base_tag, const config& match) : match(match)
|
||||
|
@ -81,7 +82,7 @@ private:
|
|||
}
|
||||
void push_new_tag_conditions(const wml_tag& tag)
|
||||
{
|
||||
wml_tag::push_new_tag_conditions(condition_queue, match, tag);
|
||||
wml_tag::push_new_tag_conditions(condition_queue, match.get(), tag);
|
||||
}
|
||||
bool equal(const iterator<T, Map>& other) const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue