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 GitHub
parent 2b34b5c7d0
commit 284672cc84
8 changed files with 47 additions and 11 deletions

View File

@@ -309,8 +309,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) {