<p>Is it possible to forward declare an standard container in a header file?  For example, take the following code:</p>

<pre><code>#include &lt;vector&gt;

class Foo
{
private:
    std::vector&lt;int&gt; container_;
    ...
};
</code></pre>

<p>I want to be able to do something like this:</p>

<pre><code>namespace std
{
    template &lt;typename T&gt; class vector;
}

class Foo
{
private:
    std::vector&lt;int&gt; container_;
    ...
};
</code></pre>

<p>Can this be done?</p>

I don't think so because the compiler would have no way of knowing how much space to allocate for the
```
container_
```
object. At best you could do:
```
```
std::vector<int> *container_;
```
```
and new it in the constructor, since the compiler knows the size of a pointer.