Loading...
Searching...
No Matches
Approx Class Reference

`#include <catch_amalgamated.hpp>`

## Public Member Functions

| Approx (double value)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
| Approx (T const &value)
Approx | operator- () const
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx | operator() (T const &value) const
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx & | epsilon (T const &newEpsilon)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx & | margin (T const &newMargin)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
Approx & | scale (T const &newScale)
std::string | toString () const

## Static Public Member Functions

static Approx | custom ()

## Private Member Functions

bool | equalityComparisonImpl (double other) const
void | setMargin (double margin)
void | setEpsilon (double epsilon)

## Private Attributes

double | m_epsilon
double | m_margin
double | m_scale
double | m_value

## Friends

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool | operator== (const T &lhs, Approx const &rhs)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool | operator== (Approx const &lhs, const T &rhs)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool | operator!= (T const &lhs, Approx const &rhs)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool | operator!= (Approx const &lhs, T const &rhs)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool | operator<= (T const &lhs, Approx const &rhs)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool | operator<= (Approx const &lhs, T const &rhs)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool | operator>= (T const &lhs, Approx const &rhs)
template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>
bool | operator>= (Approx const &lhs, T const &rhs)

## Constructor & Destructor Documentation

## Approx() [1/2]

Catch::Approx::Approx | ( | double | value | ) |

explicit

## Approx() [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

Catch::Approx::Approx | ( | T const & | value | ) |

inlineexplicit

## Member Function Documentation

## custom()

Approx Catch::Approx::custom | ( |  | ) |

static

## epsilon()

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

Approx & Catch::Approx::epsilon | ( | T const & | newEpsilon | ) |

inline

## equalityComparisonImpl()

bool Catch::Approx::equalityComparisonImpl | ( | double | other | ) | const

private

## margin()

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

Approx & Catch::Approx::margin | ( | T const & | newMargin | ) |

inline

## operator()()

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

Approx Catch::Approx::operator() | ( | T const & | value | ) | const

inline

## operator-()

Approx Catch::Approx::operator- | ( |  | ) | const

## scale()

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

Approx & Catch::Approx::scale | ( | T const & | newScale | ) |

inline

## setEpsilon()

void Catch::Approx::setEpsilon | ( | double | epsilon | ) |

private

## setMargin()

void Catch::Approx::setMargin | ( | double | margin | ) |

private

## toString()

std::string Catch::Approx::toString | ( |  | ) | const

## Friends And Related Symbol Documentation

## operator!= [1/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

bool operator!= | ( | Approx const & | lhs,
|  | T const & | rhs )

friend

## operator!= [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

bool operator!= | ( | T const & | lhs,
|  | Approx const & | rhs )

friend

## operator<= [1/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

bool operator<= | ( | Approx const & | lhs,
|  | T const & | rhs )

friend

## operator<= [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

bool operator<= | ( | T const & | lhs,
|  | Approx const & | rhs )

friend

## operator== [1/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

bool operator== | ( | Approx const & | lhs,
|  | const T & | rhs )

friend

## operator== [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

bool operator== | ( | const T & | lhs,
|  | Approx const & | rhs )

friend

## operator>= [1/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

bool operator>= | ( | Approx const & | lhs,
|  | T const & | rhs )

friend

## operator>= [2/2]

template<typename T, typename = std::enable_if_t<std::is_constructible<double, T>::value>>

bool operator>= | ( | T const & | lhs,
|  | Approx const & | rhs )

friend

## Member Data Documentation

## m_epsilon

double Catch::Approx::m_epsilon

private

## m_margin

double Catch::Approx::m_margin

private

## m_scale

double Catch::Approx::m_scale

private

## m_value

double Catch::Approx::m_value

private

The documentation for this class was generated from the following files:

- tests/vendor/catch_amalgamated.hpp
- tests/vendor/catch_amalgamated.cpp