#include <vector>
    
    struct foo {
      std::vector<int> p;
    };
    
    void someFunction(const foo& theFoo)
    {
    	theFoo.p[0] = 10;  // error.
    }
    
    int main()
    {
       foo aFoo;
       aFoo.p.resize(1);
       someFunction(aFoo);
    }