|
TTS v4.0.0
The Tiny Test System
|
How far apart two values of type T are, and when they count as IEEE-equal. More...
How far apart two values of type T are, and when they count as IEEE-equal.
Specialize this for your own types rather than overloading the free functions: a specialization that does not match is a compilation error, where a misnamed overload used to be ignored in silence. Write the members the type needs and leave the rest out: a member the specialization does not carry keeps its default.
A specialization that measures a compound type element by element calls tts::ulp_check, tts::relative_check, tts::absolute_check and tts::ieee_check on the elements. Those carry the dispatch; the trait itself answers only for a type that specializes it.
The ulp_distance, relative_distance, absolute_distance and ieee_equal free functions this replaces are gone. An overload left behind is reported where it would have been used, rather than ignored in silence.