|
|
Home » Community » Newbie corner » Error: use of deleted function ...
|
Re: Error: use of deleted function ... [message #49206 is a reply to message #49205] |
Sun, 07 January 2018 16:40   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
It seems that the compiler cannot generate operator= for some reasons. The following solution should fix your compilation problem:
Relazione &Clear() { f = {}; return *this;}
// or
Relazione &Clear() { f = RelazioneFormat(); return *this;}
If I will know more about this issue I will let you know. It would be good if you will migrate your code base to English However, I understand a lot from your current code.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Sun, 07 January 2018 16:41] Report message to a moderator
|
|
|
|
|
Re: Error: use of deleted function ... [message #49209 is a reply to message #49208] |
Sun, 07 January 2018 20:42   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
Of course it should be:
Relazione &Clear() { format = {}; return *this;}
Please read what "{}" means in c++11 if you are not familiar with this notation.
Declaring variable and picking it seems like over engineering here. We want simply reset variable to it's default state.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Sun, 07 January 2018 20:44] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 19:39:15 CEST 2025
Total time taken to generate the page: 0.00987 seconds
|
|
|