summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/python/libstdcxx
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-15 18:37:30 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-15 18:37:30 +0000
commite6624b173f6e310d411a1742de9e27739bdd6d3f (patch)
tree81401eaa7a7d0a2b21796664fe48f0466bbb3ccd /libstdc++-v3/python/libstdcxx
parent3d426abedf7d009d07879fab89aa7f25a309f9cf (diff)
downloadppe42-gcc-e6624b173f6e310d411a1742de9e27739bdd6d3f.tar.gz
ppe42-gcc-e6624b173f6e310d411a1742de9e27739bdd6d3f.zip
* testsuite/libstdc++-prettyprinters/cxx11.cc (struct datum):
New. (global): New global. (main): Add test for unique_ptr. * python/libstdcxx/v6/printers.py (UniquePointerPrinter.to_string): Extract the pointer and also print its type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190417 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/python/libstdcxx')
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 4520f32ac13..0eac413bf4a 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -71,7 +71,9 @@ class UniquePointerPrinter:
self.val = val
def to_string (self):
- return self.val['_M_t']
+ v = self.val['_M_t']['_M_head_impl']
+ return ('std::unique_ptr<%s> containing %s' % (str(v.type.target()),
+ str(v)))
class StdListPrinter:
"Print a std::list"
OpenPOWER on IntegriCloud