| 4 | #include <iostream> |
| 5 | #include <vector> |
| 6 | int main() { |
| 7 | // A vector is allocated and initialized |
| 8 | std::vector<int> v { 12 }; |
| 9 | const int& ref_to_first = v[0]; // A reference to it is taken |
| 10 | v.push_back(13); // The vector is mutated |
| 11 | std::cout << ref_to_first; // The reference accesses the vector |
| 12 | // The vector is implicitly deallocated |
| 13 | } |
nothing calls this directly
no outgoing calls
no test coverage detected