|
|
|
|
|
|
warning C4239: nonstandard extension used: 'argument': conversion from 'Vector2' to 'Vector2 &' note: A non-const reference may only be bound to an lvalue |
error C2664: 'void Add(Vector2 &)': cannot convert argument 1 from 'Vector2' to 'Vector2 &' note: A non-const reference may only be bound to an lvalue |
void Add( Vector2&& ) = delete ;
error C2280: 'void Add(Vector2 &&)': attempting to reference a deleted function note: see declaration of 'Add' |
|
|
Deleted functions If, instead of a function body, the special syntax = delete ; is used, the function is defined as deleted. Any use of a deleted function is ill-formed (the program will not compile). ... If the function is overloaded, overload resolution takes place first, and the program is only ill-formed if the deleted function was selected. http://en.cppreference.com/w/cpp/language/function#Deleted_functions |