Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fix ODR violation because of name clash in matchers

Commit
75b711a36061f5ddd2516f937a5c9bc44ef9ae8f
Author
Martin Hořeňovský ·
Parents
db32550898ac

Files · Download .tar.gz

Changes

 src/catch2/matchers/catch_matchers_vector.hpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/catch2/matchers/catch_matchers_vector.hpp b/src/catch2/matchers/catch_matchers_vector.hpp
index 71634813..41fd6939 100644
--- a/src/catch2/matchers/catch_matchers_vector.hpp
+++ b/src/catch2/matchers/catch_matchers_vector.hpp
@@ -17,9 +17,9 @@ namespace Catch {
 namespace Matchers {
 
     template<typename T, typename Alloc>
-    struct ContainsElementMatcher final : MatcherBase<std::vector<T, Alloc>> {
+    struct VectorContainsElementMatcher final : MatcherBase<std::vector<T, Alloc>> {
 
-        ContainsElementMatcher(T const& comparator):
+        VectorContainsElementMatcher(T const& comparator):
             m_comparator(comparator)
         {}
 
@@ -168,8 +168,8 @@ namespace Matchers {
 
     //! Creates a matcher that matches vectors that contain `comparator` as an element
     template<typename T, typename Alloc = std::allocator<T>>
-    ContainsElementMatcher<T, Alloc> VectorContains( T const& comparator ) {
-        return ContainsElementMatcher<T, Alloc>(comparator);
+    VectorContainsElementMatcher<T, Alloc> VectorContains( T const& comparator ) {
+        return VectorContainsElementMatcher<T, Alloc>(comparator);
     }
 
     //! Creates a matcher that matches vectors that are exactly equal to `comparator`