This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Containers: assignment, construction from


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;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]