diff options
| author | Martin Hořeňovský | 2017-04-04 15:19:15 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-04-04 15:19:15 +0200 |
| commit | 0354d50278d725d52084601300eb955cee6756d8 (patch) | |
| tree | 15e186050981a89c7341e8bb10903db7841de0c2 /include/internal/catch_debugger.cpp | |
| parent | cdd83c2e158d0e7d41900d88da14c53429d2c9d8 (diff) | |
| download | catch3-0354d50278d725d52084601300eb955cee6756d8.tar.gz | |
Added templated constructor to C++11 Approx
When using C++11, comparison operators are already templated to take
anything that can be explicitly converted to double, but constructor
took only doubles. This lead to warnings when an `Approx` was
constructed from floats, which was problematic for some users.
Since just adding float constructor would be a large breaking change, as
suddenly `Approx( 1 )` would become ambiguous, I added a templated
constructor that will take anything that is explicitly convertible to
double. This has the added benefit of allowing constructing `Approx`
instances from instances of strong typedefs, ie allowing
`calculated_temp == Approx( known_temp)`.
Closes #873
Diffstat (limited to 'include/internal/catch_debugger.cpp')
0 files changed, 0 insertions, 0 deletions