Containers: assignment, construction from

Anjul Srivastava anjul.srivastava@sanchez.com
Thu Feb 17 14:39:00 GMT 2000


I thought you could construct a container from another, as also assign one
to the other. Is the following program not legal C++? Or is the gcc
implementation of the STL incomplete?

Thanks,
Anjul.

#include <vector>
#include <list>

int main()
{
    list< int > m;

    m.push_back(3);

    vector< int > v(m);

    return 0;
}


More information about the Gcc mailing list