libstdc++/9626: g++ accepts vector<vector<int> > v(2, 4);
Paolo Carlini
pcarlini@unitus.it
Sat Feb 8 13:55:00 GMT 2003
Falk Hueffner wrote:
>No. I pass a 4, but the constructor expects an A = vector<int>. The
>only way to make a "vector<int>" from "4" is with an "explicit"
>constructor.
>
Why the constructor expects a vector<int>? Which constructor?
This constructor:
explicit vector(size_type n, const T& value = T(),
const Allocator& = Allocator())
expects a size_type!
Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9626
More information about the Gcc-bugs
mailing list