| 12 | */ |
| 13 | |
| 14 | int main() |
| 15 | { |
| 16 | const double dimLimit {99.0}; // Upper limit on Box dimensions |
| 17 | Truckload load; |
| 18 | const size_t boxCount {20}; // Number of Box object to be created |
| 19 | |
| 20 | // Create boxCount Box objects |
| 21 | for (size_t i {}; i < boxCount; ++i) |
| 22 | load.addBox(randomSharedBox()); |
| 23 | |
| 24 | std::cout << "The boxes in the Truckload are:\n"; |
| 25 | std::cout << load << std::endl; |
| 26 | |
| 27 | Truckload moveConstructedLoad{ std::move(load) }; |
| 28 | |
| 29 | std::cout << "The boxes in the move constructed Truckload are:\n"; |
| 30 | std::cout << moveConstructedLoad << std::endl; |
| 31 | |
| 32 | Truckload moveAssignedLoad; |
| 33 | moveAssignedLoad = std::move(moveConstructedLoad); |
| 34 | |
| 35 | std::cout << "The boxes in the move assigned Truckload are:\n"; |
| 36 | std::cout << moveAssignedLoad << std::endl; |
| 37 | } |
nothing calls this directly
no test coverage detected