Inline and default LazyExpression's constructor

This commit is contained in:
Martin Hořeňovský 2020-05-10 18:41:14 +02:00
parent d5e08a4beb
commit 824ffe6525
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 4 additions and 8 deletions

View File

@ -26,12 +26,6 @@ namespace Catch {
} }
} }
LazyExpression::LazyExpression( bool isNegated )
: m_isNegated( isNegated )
{}
LazyExpression::LazyExpression( LazyExpression const& other ) : m_isNegated( other.m_isNegated ) {}
auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream& { auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream& {
if( lazyExpr.m_isNegated ) if( lazyExpr.m_isNegated )
os << "!"; os << "!";

View File

@ -27,8 +27,10 @@ namespace Catch {
ITransientExpression const* m_transientExpression = nullptr; ITransientExpression const* m_transientExpression = nullptr;
bool m_isNegated; bool m_isNegated;
public: public:
LazyExpression( bool isNegated ); LazyExpression( bool isNegated ):
LazyExpression( LazyExpression const& other ); m_isNegated(isNegated)
{}
LazyExpression(LazyExpression const& other) = default;
LazyExpression& operator = ( LazyExpression const& ) = delete; LazyExpression& operator = ( LazyExpression const& ) = delete;
explicit operator bool() const { explicit operator bool() const {