Skip to content

Commit

Permalink
Fix using from_range with std::vector<>::const_iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
burlog authored and horenmar committed Nov 9, 2024
1 parent 119a7bb commit 7bbd4b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/catch2/generators/catch_generators_range.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class IteratorGenerator final : public IGenerator<T> {

template <typename InputIterator,
typename InputSentinel,
typename ResultType = typename std::iterator_traits<InputIterator>::value_type>
typename ResultType = std::remove_const_t<typename std::iterator_traits<InputIterator>::value_type>>
GeneratorWrapper<ResultType> from_range(InputIterator from, InputSentinel to) {
return GeneratorWrapper<ResultType>(Catch::Detail::make_unique<IteratorGenerator<ResultType>>(from, to));
}
Expand Down

0 comments on commit 7bbd4b9

Please sign in to comment.