MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / match

Method match

Bcore/src/main/cpp/Dobby/tests/catch.hpp:2468–2479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2466 }
2467
2468 bool match(std::vector<T> const &v) const override {
2469 // !TBD: This currently works if all elements can be compared using !=
2470 // - a more general approach would be via a compare template that defaults
2471 // to using !=. but could be specialised for, e.g. std::vector<T> etc
2472 // - then just call that directly
2473 if (m_comparator.size() != v.size())
2474 return false;
2475 for (std::size_t i = 0; i < v.size(); ++i)
2476 if (m_comparator[i] != v[i])
2477 return false;
2478 return true;
2479 }
2480 std::string describe() const override {
2481 return "Equals: " + ::Catch::Detail::stringify(m_comparator);
2482 }

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected