public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32237] New: can't compile when a vector is based on a local struct
@ 2007-06-06 18:57 danielm77 at spray dot se
2007-06-06 19:02 ` [Bug c++/32237] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: danielm77 at spray dot se @ 2007-06-06 18:57 UTC (permalink / raw)
To: gcc-bugs
I can't compile this code:
void f()
{
struct a { int i; };
std::vector<a> v;
}
Moving the struct declaration out of the function solves the problem.
--
Summary: can't compile when a vector is based on a local struct
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danielm77 at spray dot se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32237
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/32237] can't compile when a vector is based on a local struct
2007-06-06 18:57 [Bug c++/32237] New: can't compile when a vector is based on a local struct danielm77 at spray dot se
@ 2007-06-06 19:02 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-06 19:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-06-06 19:01 -------
That is correct, template arguments cannot be local classes/structs.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32237
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-06 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-06 18:57 [Bug c++/32237] New: can't compile when a vector is based on a local struct danielm77 at spray dot se
2007-06-06 19:02 ` [Bug c++/32237] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).