Support pre-CXX11 compilers

I'll update the toolchain one day, I promise!
This commit is contained in:
Matthias Kuhn 2016-08-31 17:54:28 +02:00
parent bd3cf76f5f
commit d5377dbc2e
3 changed files with 7 additions and 2 deletions

View File

@ -391,13 +391,14 @@ ELSE()
ENDIF()
#allow override keyword if available
IF (NOT USE_CXX_11)
IF(NOT USE_CXX_11)
ADD_DEFINITIONS("-Doverride=")
ADD_DEFINITIONS("-Dnoexcept=")
ADD_DEFINITIONS("-Dnullptr=0")
ELSE()
ADD_DEFINITIONS("-DHAS_MOVE_SEMANTICS")
ENDIF()
#############################################################
# enable warnings

View File

@ -217,6 +217,7 @@ QgsExpressionContext::QgsExpressionContext( const QgsExpressionContext& other )
mCachedValues = other.mCachedValues;
}
#ifdef HAS_MOVE_SEMANTICS
QgsExpressionContext& QgsExpressionContext::operator=( QgsExpressionContext && other )
{
if ( this != &other )
@ -231,6 +232,7 @@ QgsExpressionContext& QgsExpressionContext::operator=( QgsExpressionContext && o
}
return *this;
}
#endif
QgsExpressionContext& QgsExpressionContext::operator=( const QgsExpressionContext & other )
{

View File

@ -259,7 +259,9 @@ class CORE_EXPORT QgsExpressionContext
QgsExpressionContext& operator=( const QgsExpressionContext& other );
#ifdef HAS_MOVE_SEMANTICS
QgsExpressionContext& operator=( QgsExpressionContext && other );
#endif
~QgsExpressionContext();