check c++11 for move constructor

This commit is contained in:
Hamed Masafi 2018-02-17 19:45:57 +03:30
parent 0762e647fb
commit ace81b6fed
2 changed files with 5 additions and 2 deletions

View File

@ -258,11 +258,12 @@ ConditionalPhrase::ConditionalPhrase(const ConditionalPhrase &other)
this->data = new PhraseData(other.data);
}
#if __cplusplus >= 201103L
ConditionalPhrase::ConditionalPhrase(const ConditionalPhrase &&other)
{
qDebug() << "************* ctor called:";
this->data = new PhraseData(other.data);
this->data = std::move(other.data);
}
#endif
ConditionalPhrase::ConditionalPhrase(const PhraseData *data)
{

View File

@ -160,7 +160,9 @@ public:
QSharedPointer<PhraseData> rightDataPointer;
ConditionalPhrase();
ConditionalPhrase(const ConditionalPhrase &other);
#if __cplusplus >= 201103L
ConditionalPhrase(const ConditionalPhrase &&other);
#endif
ConditionalPhrase(const PhraseData *data);
ConditionalPhrase(AbstractFieldPhrase *, PhraseData::Condition);
ConditionalPhrase(AbstractFieldPhrase *, PhraseData::Condition, const QVariant &v);