Add a from_range(Container) overload to the generator helpers
This commit is contained in:
parent
1c5749669e
commit
c8db4e77c4
8 changed files with 293 additions and 60 deletions
|
@ -161,6 +161,13 @@ GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) {
|
|||
return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(from, to));
|
||||
}
|
||||
|
||||
template <typename Container,
|
||||
typename ResultType = typename Container::value_type>
|
||||
GeneratorWrapper<ResultType> from_range(Container const& cnt) {
|
||||
return GeneratorWrapper<ResultType>(pf::make_unique<IteratorGenerator<ResultType>>(cnt.begin(), cnt.end()));
|
||||
}
|
||||
|
||||
|
||||
} // namespace Generators
|
||||
} // namespace Catch
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue