public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57870] New: Internal compiler error in use of emplace
@ 2013-07-09 20:18 eyakubovich at gmail dot com
0 siblings, 0 replies; only message in thread
From: eyakubovich at gmail dot com @ 2013-07-09 20:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57870
Bug ID: 57870
Summary: Internal compiler error in use of emplace
Product: gcc
Version: 4.7.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eyakubovich at gmail dot com
In the following code, S lacks a constructor that accepts an int. Subsequently,
g++ crashes on use of emplace:
#include <queue>
struct S {
int x;
friend bool operator<(S const&, S const&) { return false; }
};
int main() {
std::priority_queue<S> q;
q.emplace(1);
return 0;
}
A similar problem occurs with use of std::vector, however a correct error is
first issued:
#include <vector>
struct S {
int x;
};
int main() {
std::vector<S> q;
q.emplace(q.begin(), 1);
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-09 20:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-09 20:18 [Bug c++/57870] New: Internal compiler error in use of emplace eyakubovich at gmail dot com
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).