Move templates around to avoid linkage errors when CATCH_CONFIG_MAIN isn't defined

This commit is contained in:
Ryan Gonzalez 2016-01-22 12:49:42 -06:00
parent 2beec11153
commit f08e5ff915
2 changed files with 8 additions and 12 deletions

View File

@ -79,9 +79,15 @@ namespace Catch {
ResultBuilder& setResultType( ResultWas::OfType result );
ResultBuilder& setResultType( bool result );
template <typename T>
ResultBuilder& setLhs( T const& lhs );
ResultBuilder& setLhs( T const& lhs ) {
m_exprComponents.lhs = new AnyTypeHolder<T>( lhs );
return *this;
}
template <typename T>
ResultBuilder& setRhs( T const& rhs );
ResultBuilder& setRhs( T const& rhs ) {
m_exprComponents.rhs = new AnyTypeHolder<T>( rhs );
return *this;
}
ResultBuilder& setOp( std::string const& op );
void endExpression();

View File

@ -41,16 +41,6 @@ namespace Catch {
m_data.resultType = result ? ResultWas::Ok : ResultWas::ExpressionFailed;
return *this;
}
template <typename T>
ResultBuilder& ResultBuilder::setLhs( T const& lhs ) {
m_exprComponents.lhs = new AnyTypeHolder<T>( lhs );
return *this;
}
template <typename T>
ResultBuilder& ResultBuilder::setRhs( T const& rhs ) {
m_exprComponents.rhs = new AnyTypeHolder<T>( rhs );
return *this;
}
ResultBuilder& ResultBuilder::setOp( std::string const& op ) {
m_exprComponents.op = op;
return *this;