ComPPare 1.0.0
|
Namespaces | |
namespace | autopolicy |
Classes | |
struct | is_metric_value |
Partial specialisation for not a MetricValue. More... | |
struct | is_metric_value< MetricValue< U > > |
Partial specialisation for any MetricValue and returns true. More... | |
class | MetricValue |
Wrapper for a value that can be streamed to an output stream. More... | |
Concepts | |
concept | IsMetricValue |
Concept for a MetricValue. | |
concept | ErrorPolicy |
Concept for a valid Error Policy. | |
Functions | |
template<class EP , class V > | |
void | compute_error (EP &ep, const V &a, const V &b) |
Wrapper function to compute the error using the given instance of the error policy. | |
template<class EP > | |
bool | is_fail (const EP &ep) |
Wrapper function to check if the error policy indicates a failure. | |
Variables | |
template<typename M > | |
constexpr bool | is_metric_value_v = is_metric_value<std::remove_cvref_t<M>>::value |
Checks if a type is a MetricValue. | |
|
inline |
Wrapper function to compute the error using the given instance of the error policy.
EP | Error Policy type |
V | Value type |
ep | Error policy instance |
a | First value |
b | Second value |
|
inline |
Wrapper function to check if the error policy indicates a failure.
EP | Error Policy type |
ep | Error policy instance |
|
inlineconstexpr |
Checks if a type is a MetricValue.
M | The type to check |
If M is of type MetricValue<T> for some T, then is_metric_value_v<M> is true. Otherwise, it is false. This is implemented using template specialization of the is_metric_value struct.