Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Catch::Matchers::Vector::ContainsElementMatcher< T > Struct Template Reference

#include <catch.hpp>

Inheritance diagram for Catch::Matchers::Vector::ContainsElementMatcher< T >:
Collaboration diagram for Catch::Matchers::Vector::ContainsElementMatcher< T >:

Public Member Functions

 ContainsElementMatcher (T const &comparator)
 
bool match (std::vector< T > const &v) const override
 
std::string describe () const override
 

Public Attributes

T const & m_comparator
 

Detailed Description

template<typename T>
struct Catch::Matchers::Vector::ContainsElementMatcher< T >

Definition at line 2768 of file catch.hpp.

Constructor & Destructor Documentation

template<typename T >
Catch::Matchers::Vector::ContainsElementMatcher< T >::ContainsElementMatcher ( T const &  comparator)
inline

Definition at line 2770 of file catch.hpp.

2770 : m_comparator( comparator) {}

Member Function Documentation

template<typename T >
std::string Catch::Matchers::Vector::ContainsElementMatcher< T >::describe ( ) const
inlineoverride

Definition at line 2781 of file catch.hpp.

References Catch::Detail::stringify().

2781  {
2782  return "Contains: " + ::Catch::Detail::stringify( m_comparator );
2783  }
std::string stringify(const T &e)
Definition: catch.hpp:955
template<typename T >
bool Catch::Matchers::Vector::ContainsElementMatcher< T >::match ( std::vector< T > const &  v) const
inlineoverride

Definition at line 2772 of file catch.hpp.

2772  {
2773  for (auto const& el : v) {
2774  if (el == m_comparator) {
2775  return true;
2776  }
2777  }
2778  return false;
2779  }

Member Data Documentation

template<typename T >
T const& Catch::Matchers::Vector::ContainsElementMatcher< T >::m_comparator

Definition at line 2785 of file catch.hpp.


The documentation for this struct was generated from the following file: