Skip to main content
added 14 characters in body
Source Link
Incomputable
  • 9.7k
  • 3
  • 34
  • 73

Since container has ownership of elements, it is responsible for preventing corruption of the data inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy andcopy and move operationsoperations is disabled. It would be great to have rule of five implemented, especially for the containers.

Since container has ownership of elements, it is responsible for preventing corruption of the data inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the containers.

Since container has ownership of elements, it is responsible for preventing corruption of the data inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the containers.

deleted 50 characters in body
Source Link
Incomputable
  • 9.7k
  • 3
  • 34
  • 73

I'll finalizeRule of five:

Since container has ownership of elements, it is responsible for preventing corruption of the issue I raised indata inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the commentscontainers.

Actually compiler can elide some (or all unnecessary ones) copy constructor calls, but it doesn't mean that one shouldn't care about it.

Rule of five:

Since container has ownership of elements, it is responsible for preventing corruption of the data inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the containers.

I'll finalize the issue I raised in the comments.

Actually compiler can elide some (or all unnecessary ones) copy constructor calls, but it doesn't mean that one shouldn't care about it.

Rule of five:

Since container has ownership of elements, it is responsible for preventing corruption of the data inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the containers.

Rule of five:

Since container has ownership of elements, it is responsible for preventing corruption of the data inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the containers.

Actually compiler can elide some (or all unnecessary ones) copy constructor calls, but it doesn't mean that one shouldn't care about it.

added 25 characters in body
Source Link
Incomputable
  • 9.7k
  • 3
  • 34
  • 73

Since container has ownership of elements, it owns them(and memory it allocated), itis responsible for preventing corruption of the data inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the containers.

Since container has ownership of elements, it owns them(and memory it allocated), it has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the containers.

Since container has ownership of elements, it is responsible for preventing corruption of the data inside. It has to take care of those resources when copied/moved. Since explicit destructor is declared, default generation of copy and move operations is disabled. It would be great to have rule of five implemented, especially for the containers.

deleted 281 characters in body
Source Link
Incomputable
  • 9.7k
  • 3
  • 34
  • 73
Loading
added 5 characters in body
Source Link
Incomputable
  • 9.7k
  • 3
  • 34
  • 73
Loading
added 152 characters in body
Source Link
Incomputable
  • 9.7k
  • 3
  • 34
  • 73
Loading
Source Link
Incomputable
  • 9.7k
  • 3
  • 34
  • 73
Loading