Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-02-06 15:34:32 +0100
committerMartin Hořeňovský2023-02-06 15:34:38 +0100
commitcefa8fcf329c950493f80dcbf7e2870a20213e0f (patch)
treeb64ede4a721caa304d70979a8d5760a003dd7ad9 /src
parent772fa3f7902b534d59e5fe4306e3cc6a255a6508 (diff)
downloadcatch3-cefa8fcf329c950493f80dcbf7e2870a20213e0f.tar.gz
Enable use of UnorderedRangeEquals with iterator+sentinel pairs
Diffstat (limited to 'src')
-rw-r--r--src/catch2/matchers/catch_matchers_range_equals.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/catch2/matchers/catch_matchers_range_equals.hpp b/src/catch2/matchers/catch_matchers_range_equals.hpp
index c0985fd9..ce66bed9 100644
--- a/src/catch2/matchers/catch_matchers_range_equals.hpp
+++ b/src/catch2/matchers/catch_matchers_range_equals.hpp
@@ -8,8 +8,10 @@
#ifndef CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED
#define CATCH_MATCHERS_RANGE_EQUALS_HPP_INCLUDED
-#include <algorithm>
+#include <catch2/internal/catch_is_permutation.hpp>
#include <catch2/matchers/catch_matchers_templated.hpp>
+
+#include <algorithm>
#include <utility>
namespace Catch {
@@ -73,11 +75,11 @@ namespace Catch {
bool match( RangeLike&& rng ) const {
using std::begin;
using std::end;
- return std::is_permutation( begin( m_desired ),
- end( m_desired ),
- begin( rng ),
- end( rng ),
- m_predicate );
+ return Catch::Detail::is_permutation( begin( m_desired ),
+ end( m_desired ),
+ begin( rng ),
+ end( rng ),
+ m_predicate );
}
std::string describe() const override {