#include <cstddef>
#include <iostream>
#include <limits>
#include <vector>

int main() {
    std::vector<int> values{2, 4, 6};
    int* borrowed{&values[0]};
    std::cout << *borrowed << '\n';
    const std::size_t before{values.capacity()};
    if (before >= values.max_size() || before == std::numeric_limits<std::size_t>::max()) {
        std::cout << "capacity limit\n";
        return 1;
    }
    values.reserve(before + 1);
    // Replace the invalid pointer value without reading or comparing it.
    borrowed = &values[0];
    std::cout << (values.capacity() > before) << ' ' << values.size() << '\n';
    std::cout << *borrowed << ' ' << values[1] << ' ' << values[2] << '\n';
    return 0;
}
