MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / main

Function main

Exercises/Modules/Chapter 13/Soln13_06/Soln13_06.cpp:25–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25int main()
26{
27 Box box1{2, 3, 4};
28 std::cout << "box1 is " << box1 << std::endl;
29 testBox(box1);
30
31 std::cout << std::endl;;
32
33 Box box2{0, 0, 0};
34 std::cout << "box2 is " << box2 << std::endl;
35 testBox(box2);
36
37 // bool b1{ box1 }; /* Does not compile! */
38 bool b2{ static_cast<bool>(box2) }; // Needs an explicit type conversion
39}

Callers

nothing calls this directly

Calls 1

testBoxFunction · 0.70

Tested by

no test coverage detected