Subject: Re: [boost] enhanced vector and deque competency test
From: Giacomo Drago (giacomo_at_[hidden])
Date: 2015-03-20 14:20:19
On 2015-03-20 17:55, Islam Taha wrote:
> Thank you again
> I think itâs solved right now, you can check it
You welcome, Islam.
Yes, the copy constructor seems fine (maybe you can optimize it by
preallocating the space in advance).
The copy assignment operator is completely broken. It does not compile,
and its declaration is wrong. Please review C++ idioms in general,
writing a container implies them. You can also remove all that __ before
your variables since you are not implementing the standard library (yet)
and I believe doing so on user code is even forbidden.
When you write your tests, you should ensure every single line of the
source is hit. This is no sufficient condition for your code to be
"tested", but it is a necessary one. Writing (copy/move) constructors
and assignment operators is tricky, they are part of the class
interface, and should be tested.