Added a range member function to evaluate an iterator range
This commit is contained in:
parent
382557878a
commit
c6589b5951
1 changed files with 9 additions and 0 deletions
|
|
@ -45,6 +45,15 @@ template<class EOT> struct eoEvalFunc {
|
||||||
|
|
||||||
/// Effectively applies the evaluation function to an EO
|
/// Effectively applies the evaluation function to an EO
|
||||||
virtual void operator() ( EOT & _eo ) const = 0;
|
virtual void operator() ( EOT & _eo ) const = 0;
|
||||||
|
|
||||||
|
template <class It>
|
||||||
|
void range(It begin, It end) const
|
||||||
|
{
|
||||||
|
for (;begin != end; ++begin)
|
||||||
|
{
|
||||||
|
operator()(*begin);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Reference in a new issue