Support sentinel-based ranges in default stringify (#2004)

This commit is contained in:
Sean Middleditch
2020-08-18 01:34:47 -07:00
committed by Martin Hořeňovský
parent 08fb5cbab2
commit 31d4831245
11 changed files with 53 additions and 12 deletions

View File

@@ -311,8 +311,8 @@ namespace Catch {
#endif
namespace Detail {
template<typename InputIterator>
std::string rangeToString(InputIterator first, InputIterator last) {
template<typename InputIterator, typename Sentinel = InputIterator>
std::string rangeToString(InputIterator first, Sentinel last) {
ReusableStringStream rss;
rss << "{ ";
if (first != last) {