This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/67440] New: pretty-printing of a const set<foo> fails
- From: "dje at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Sep 2015 00:18:46 +0000
- Subject: [Bug libstdc++/67440] New: pretty-printing of a const set<foo> fails
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67440
Bug ID: 67440
Summary: pretty-printing of a const set<foo> fails
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: dje at google dot com
Target Milestone: ---
Type lookup in the pretty-printer of const set<foo> fails, set<foo> should be
used instead.
With the attached changes to the testcase, before the attached patch, one sees:
Python Exception <type 'exceptions.ValueError'> Cannot find type const
std::__debug::set<int, std::less<int>, std::allocator<int> >::_Rep_type:
Index: testsuite/libstdc++-prettyprinters/simple.cc
===================================================================
--- testsuite/libstdc++-prettyprinters/simple.cc (revision 227421)
+++ testsuite/libstdc++-prettyprinters/simple.cc (working copy)
@@ -73,6 +73,9 @@
std::map<std::string, int>::iterator mpiter = mp.begin();
// { dg-final { note-test mpiter {{first = "zardoz", second = 23}} } }
+ const std::set<int> const_intset = {2, 3};
+// { dg-final { note-test const_intset {std::set with 2 elements = {[0] = 2,
[1] = 3}} } }
+
std::set<std::string> sp;
sp.insert("clownfish");
sp.insert("barrel");