Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_stringdata.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-04-04 15:19:15 +0200
committerMartin Hořeňovský2017-04-04 15:19:15 +0200
commit0354d50278d725d52084601300eb955cee6756d8 (patch)
tree15e186050981a89c7341e8bb10903db7841de0c2 /include/internal/catch_stringdata.cpp
parentcdd83c2e158d0e7d41900d88da14c53429d2c9d8 (diff)
downloadcatch3-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_stringdata.cpp')
0 files changed, 0 insertions, 0 deletions