public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/63500] New: bug in debug version of std::make_move_iterator?
@ 2014-10-09 17:13 vermaelen.wouter at gmail dot com
  2014-10-09 18:17 ` [Bug libstdc++/63500] " glisse at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vermaelen.wouter at gmail dot com @ 2014-10-09 17:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63500

            Bug ID: 63500
           Summary: bug in debug version of std::make_move_iterator?
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vermaelen.wouter at gmail dot com

Is the following a bug in the debug version of std::make_move_iterator or is it
a bug in my code? It compiles fine with older gcc versions (both debug and
non-debug). But when using a fairly recent gcc-5.0 snapshot it fails to compile
when using -D_GLIBCXX_DEBUG, non-debug mode works fine.

---- 8< -------- 8< -------- 8< -------- 8< -------- 8< ----

// Compiles fine with:
//   g++-4.8      -std=c++11 -c -D_GLIBCXX_DEBUG bug.cc
//   g++-snapshot -std=c++11 -c                  bug.cc
// But this fails:
//   g++-snapshot -std=c++11 -c -D_GLIBCXX_DEBUG bug.cc

#include <iterator>
#include <memory>
#include <vector>

class Foo {};

std::vector<std::unique_ptr<Foo>> v;
std::vector<std::unique_ptr<Foo>> w;

void test() {
    v.insert(end(v),
             make_move_iterator(begin(w)),
             make_move_iterator(end  (w)));
}


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-11 19:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-09 17:13 [Bug libstdc++/63500] New: bug in debug version of std::make_move_iterator? vermaelen.wouter at gmail dot com
2014-10-09 18:17 ` [Bug libstdc++/63500] " glisse at gcc dot gnu.org
2014-10-09 18:36 ` [Bug libstdc++/63500] [4.9/5 Regression] " glisse at gcc dot gnu.org
2014-10-09 18:45 ` redi at gcc dot gnu.org
2014-10-10 20:37 ` fdumont at gcc dot gnu.org
2014-10-15 20:41 ` fdumont at gcc dot gnu.org
2015-03-11 19:54 ` redi at gcc dot gnu.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).