public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jyasskin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/52799] New: deque::emplace(iterator, ...) tries to call push_front(...), which doesn't exist Date: Fri, 30 Mar 2012 23:18:00 -0000 [thread overview] Message-ID: <bug-52799-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52799 Bug #: 52799 Summary: deque::emplace(iterator, ...) tries to call push_front(...), which doesn't exist Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: jyasskin@gcc.gnu.org $ cat emplace.cc #include <deque> int main() { std::deque<int> d; d.emplace(d.begin()); } $ g++-4.8pre --version g++-4.8pre (GCC) 4.8.0 20120330 (experimental) $ g++-4.8pre -std=c++11 emplace.cc -c -o /dev/null In file included from .../include/c++/4.8.0/deque:67:0, from emplace.cc:1: .../include/c++/4.8.0/bits/deque.tcc: In instantiation of ‘std::deque<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::emplace(std::deque<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {}; _Tp = int; _Alloc = std::allocator<int>; std::deque<_Tp, _Alloc>::iterator = std::_Deque_iterator<int, int&, int*>]’: emplace.cc:5:22: required from here .../include/c++/4.8.0/bits/deque.tcc:178:6: error: no matching function for call to ‘std::deque<int>::push_front()’ .../include/c++/4.8.0/bits/deque.tcc:178:6: note: candidates are: In file included from .../include/c++/4.8.0/deque:65:0, from emplace.cc:1: .../include/c++/4.8.0/bits/stl_deque.h:1357:7: note: void std::deque<_Tp, _Alloc>::push_front(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::deque<_Tp, _Alloc>::value_type = int] .../include/c++/4.8.0/bits/stl_deque.h:1357:7: note: candidate expects 1 argument, 0 provided .../include/c++/4.8.0/bits/stl_deque.h:1370:7: note: void std::deque<_Tp, _Alloc>::push_front(std::deque<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::deque<_Tp, _Alloc>::value_type = int] .../include/c++/4.8.0/bits/stl_deque.h:1370:7: note: candidate expects 1 argument, 0 provided ... The problem is that deque::emplace(iterator __position, _Args&&... __args) tries to forward to push_front(std::forward<_Args>(__args)...) instead of emplace_front(std::forward<_Args>(__args)...), and similarly for *_back(). I haven't checked the other containers for similar problems.
next reply other threads:[~2012-03-30 23:11 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-03-30 23:18 jyasskin at gcc dot gnu.org [this message] 2012-03-31 1:27 ` [Bug libstdc++/52799] " paolo.carlini at oracle dot com 2012-03-31 1:57 ` paolo at gcc dot gnu.org 2012-03-31 1:59 ` paolo at gcc dot gnu.org 2012-03-31 2:03 ` paolo.carlini at oracle dot com 2023-06-09 8:55 ` cvs-commit at gcc dot gnu.org 2023-06-29 23:00 ` cvs-commit at gcc dot gnu.org 2024-03-18 14:05 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-52799-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).