Hold values by value and references by reference

This commit is contained in:
Phil Nash 2011-09-19 18:19:13 +01:00
parent 0653f4880b
commit 08a1b51987

View File

@ -367,7 +367,7 @@ public:
Expression Expression
( (
MutableResultInfo& result, MutableResultInfo& result,
const T& lhs T lhs
) )
: m_result( result ), : m_result( result ),
m_lhs( lhs ) m_lhs( lhs )
@ -475,7 +475,7 @@ public:
private: private:
MutableResultInfo& m_result; MutableResultInfo& m_result;
const T& m_lhs; T m_lhs;
}; };
template<typename LhsT> template<typename LhsT>
@ -564,12 +564,12 @@ public:
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
template<typename T> template<typename T>
Expression<T> operator->* Expression<const T&> operator->*
( (
const T & operand const T & operand
) )
{ {
Expression<T> expr( m_result, operand ); Expression<const T&> expr( m_result, operand );
return expr; return expr;
} }