From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12078 invoked by alias); 30 Mar 2012 23:11:43 -0000 Received: (qmail 12069 invoked by uid 22791); 30 Mar 2012 23:11:41 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,SUBJ_OBFU_PUNCT_FEW X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Mar 2012 23:11:29 +0000 From: "jyasskin at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jyasskin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg02711.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52799 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 int main() { std::deque d; d.emplace(d.begin()); } $ g++-4.8pre --version g++-4.8pre (GCC) 4.8.0 20120330 (experimental) $ g++-4.8pre -std=3Dc++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 =E2=80=98std::deq= ue<_Tp, _Alloc>::iterator std::deque<_Tp, _Alloc>::emplace(std::deque<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args =3D {}; _Tp =3D int; _Alloc =3D std::allocator; std::deque<_Tp, _Alloc>::iterator =3D std::_Deque_iterator]=E2=80=99: emplace.cc:5:22: required from here .../include/c++/4.8.0/bits/deque.tcc:178:6: error: no matching function for call to =E2=80=98std::deque::push_front()=E2=80=99 .../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 =3D int; _Alloc =3D std::allocator; std::deque<_Tp, _Alloc>::value_type =3D 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 =3D in= t; _Alloc =3D std::allocator; std::deque<_Tp, _Alloc>::value_type =3D 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.