mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	ApproxMacher uses Approx's overloads for double directly
This saves a tiny little bit of compilation times when the `ApproxMatcher` is used and `epsilon`, `margin`, or `scale` are used to customize its behaviour.
This commit is contained in:
		| @@ -116,17 +116,17 @@ namespace Matchers { | ||||
|         } | ||||
|         template <typename = std::enable_if_t<std::is_constructible<double, T>::value>> | ||||
|         ApproxMatcher& epsilon( T const& newEpsilon ) { | ||||
|             approx.epsilon(newEpsilon); | ||||
|             approx.epsilon(static_cast<double>(newEpsilon)); | ||||
|             return *this; | ||||
|         } | ||||
|         template <typename = std::enable_if_t<std::is_constructible<double, T>::value>> | ||||
|         ApproxMatcher& margin( T const& newMargin ) { | ||||
|             approx.margin(newMargin); | ||||
|             approx.margin(static_cast<double>(newMargin)); | ||||
|             return *this; | ||||
|         } | ||||
|         template <typename = std::enable_if_t<std::is_constructible<double, T>::value>> | ||||
|         ApproxMatcher& scale( T const& newScale ) { | ||||
|             approx.scale(newScale); | ||||
|             approx.scale(static_cast<double>(newScale)); | ||||
|             return *this; | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský