This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/9626: g++ accepts vector<vector<int> > v(2, 4);
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: paolo at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 8 Feb 2003 13:56:00 -0000
- Subject: Re: libstdc++/9626: g++ accepts vector<vector<int> > v(2, 4);
- Reply-to: Paolo Carlini <pcarlini at unitus dot it>
The following reply was made to PR libstdc++/9626; it has been noted by GNATS.
From: Paolo Carlini <pcarlini@unitus.it>
To: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
Cc: paolo@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/9626: g++ accepts vector<vector<int> > v(2, 4);
Date: Sat, 08 Feb 2003 14:55:17 +0100
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