MCPcopy Create free account
hub / github.com/apache/singa / Equals

Method Equals

test/gtest/gtest.h:13825–13840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13823 }
13824 virtual const ParamType* Current() const { return &current_value_; }
13825 virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
13826 // Having the same base generator guarantees that the other
13827 // iterator is of the same type and we can downcast.
13828 GTEST_CHECK_(BaseGenerator() == other.BaseGenerator())
13829 << "The program attempted to compare iterators "
13830 << "from different generators." << std::endl;
13831 const Iterator* typed_other =
13832 CheckedDowncastToActualType<const Iterator>(&other);
13833 // We must report iterators equal if they both point beyond their
13834 // respective ranges. That can happen in a variety of fashions,
13835 // so we have to consult AtEnd().
13836 return (AtEnd() && typed_other->AtEnd()) ||
13837 (
13838 current1_ == typed_other->current1_ &&
13839 current2_ == typed_other->current2_);
13840 }
13841
13842 private:
13843 Iterator(const Iterator& other)

Callers

nothing calls this directly

Calls 2

BaseGeneratorMethod · 0.45
AtEndMethod · 0.45

Tested by

no test coverage detected