mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Moved Approx into its own namespace to avoid ADL issues with operator ==
This commit is contained in:
parent
3c08431c92
commit
01db6c4471
@ -66,6 +66,6 @@
|
||||
// Still to be implemented
|
||||
#define CHECK_NOFAIL( expr ) // !TBD - reports violation, but doesn't fail Test
|
||||
|
||||
using Catch::Approx;
|
||||
using Catch::Detail::Approx;
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED
|
||||
|
@ -591,10 +591,11 @@ inline double catch_max( double x, double y )
|
||||
{
|
||||
return x > y ? x : y;
|
||||
}
|
||||
|
||||
class Approx
|
||||
namespace Detail
|
||||
{
|
||||
public:
|
||||
class Approx
|
||||
{
|
||||
public:
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// !TBD more generic
|
||||
explicit Approx
|
||||
@ -631,13 +632,14 @@ public:
|
||||
}
|
||||
|
||||
double m_d;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template<>
|
||||
inline std::string toString<Approx>
|
||||
inline std::string toString<Detail::Approx>
|
||||
(
|
||||
const Approx& value
|
||||
const Detail::Approx& value
|
||||
)
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
Loading…
Reference in New Issue
Block a user