All right, it's recording. All right, sweet. So we're just going to run through the code here.
We've got these five constructors. We've got the default constructor, which just sets it to like a null and empty vector. We've got the non-default constructor, which just sets the container variable, the vector to whatever's on the right hand side, the container for whatever that is. And then we've got that, but delete. the old right hand side so we're using the move element and then the fourth one is basically the same as the second one um fifth one is basically the same as the third one using std move for the right hand side and then we've got that destructure there but that's not doing very much uh container that clear um and then where we were overloading the operator so i had to think of what that was called um And we've got it both where it copies it and leaves it intact.
It's got the const stack versus deleting the old one. So we use again the std move to get rid of the old one and copy it over to this return this for both of those. And then swap is fairly straightforward.
The vector has a function for that. So we just container dot swap. Oh, where did it move to?
Oh, um, yeah we use the pushback function for the to push both the um what would you call those the one that's supposed to be destroyed and the one that's not the the constant the r value um again just pushback versus pushback std move so we get rid of the old lmm we've got pop which is it checks to see and make sure that the container isn't empty because otherwise we don't want to pop anything off of it If it's not empty, then container.popback. Size, yeah, just return container.size, how big it is. Empty just returns whether it's been instantiated, whether there's anything in it or not.
And then at the bottom, we just have the container vector variable. And right here, we are testing just how the pop function works, which we will have a vector of four. or a stack of four and we'll just push back all of them and then start popping them off and checking the container.size to make sure it's decreasing while the capacity stays the same.
And then our next one is just to make sure that we try to test the popback function or the pop function on an empty stack. So if we were to run it, we can see that there is a success rate of 100% for the SPY and the stack. And that's it.