This is the mail archive of the gcc-bugs@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]

Re: Internal Compiler Error 364


Brian Osman <bosman@clariion.com> writes:

> I'm not sure if this actually allowed in C++

It is not.  [lib.containers.requirements]/1 states that containers are 
objects that store other objects.  Since references are not objects,
they cannot be stored in containers.

> I got ICE 364 with the following code:

The latest snapshot prints lots of error messages about not being able 
to create pointers to reference types instead of the ICE.

> #include <vector>
> int main() { vector<int &> v; int x; int &y = x; v.push_back(y);
> return 0; }

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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