mardi 10 mars 2015

VIsual Studio 2013 C++ problems with reference qualifiers

I found a lot of information in the internet about Reference qualifiers, and also I found that reference qualifiers are new to C++ 11, and are not implemented in all compilers yet. But I was unable to find any information for Visual Studio 2013, and reference qualifier. Can someone please help me with this matter ? Is it reference qualifiers in Visual Studio 2013, and should i perform any additional steps?


Also I have the following code:



virtual AddOns* clone() const &
{
return new AddOns(*this);
}

virtual AddOns* clone() &&
{
return new AddOns(std::move(*this));
}


Visual Studio 2013 returns this error on the following code: Error 1 error C2143: syntax error : missing ';' before '&'


And I can not find any information how to correct it. Could some please help me?


Thank you in advance for your answers.


Aucun commentaire:

Enregistrer un commentaire