Enabled previous commit under MSVC, introduced new feature toggle

This commit is contained in:
Martin Hořeňovský
2017-01-26 18:47:29 +01:00
parent c06afe438e
commit 60a9ac7e65
4 changed files with 17 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ TEST_CASE( "Approximate PI", "[Approx][PI]" )
////////////////////////////////////////////////////////////////////////////////
#if defined(CATCH_CPP11_OR_GREATER)
#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
class StrongDoubleTypedef
{
double d_ = 0.0;
@@ -153,6 +153,10 @@ class StrongDoubleTypedef
explicit operator double() const { return d_; }
};
inline std::ostream& operator<<( std::ostream& os, StrongDoubleTypedef td ) {
return os << "StrongDoubleTypedef(" << static_cast<double>(td) << ")";
}
TEST_CASE
(
"Comparison with explicitly convertible types",