Split out LazyExpr into its own header

This enables us to avoid `catch_reporter_bases.hpp` being indirectly
dependent on `catch_tostring.hpp`, cutting apart quite a bit indirect
inclusions.
This commit is contained in:
Martin Hořeňovský 2020-05-10 19:19:42 +02:00
parent 824ffe6525
commit 27f1756d8e
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
10 changed files with 72 additions and 45 deletions

View file

@ -11,6 +11,7 @@
#include <catch2/catch_assertion_info.hpp>
#include <catch2/internal/catch_decomposer.hpp>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <catch2/internal/catch_lazy_expr.hpp>
namespace Catch {
@ -19,27 +20,6 @@ namespace Catch {
struct IResultCapture;
class RunContext;
class LazyExpression {
friend class AssertionHandler;
friend struct AssertionStats;
friend class RunContext;
ITransientExpression const* m_transientExpression = nullptr;
bool m_isNegated;
public:
LazyExpression( bool isNegated ):
m_isNegated(isNegated)
{}
LazyExpression(LazyExpression const& other) = default;
LazyExpression& operator = ( LazyExpression const& ) = delete;
explicit operator bool() const {
return m_transientExpression != nullptr;
}
friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&;
};
struct AssertionReaction {
bool shouldDebugBreak = false;
bool shouldThrow = false;