r271159 - in /trunk/libstdc++-v3: ChangeLog pyt...

redi@gcc.gnu.org redi@gcc.gnu.org
Tue May 14 11:17:00 GMT 2019


Author: redi
Date: Tue May 14 11:17:18 2019
New Revision: 271159

URL: https://gcc.gnu.org/viewcvs?rev=271159&root=gcc&view=rev
Log:
Fix unique_ptr pretty printer for empty classes

The printer was confused when unique_ptr<T,D>::pointer is an empty
class, or the deleter is not empty. Instead of assuming the tuple has a
single _M_head_impl member manually inspect the tuple base classes to
get the first element.

	* python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
	not assume field called _M_head_impl is the first tuple element.
	* testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
	implementation more accurate.
	* testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
	empty pointer type and non-empty deleter.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/python/libstdcxx/v6/printers.py
    trunk/libstdc++-v3/testsuite/libstdc++-prettyprinters/compat.cc
    trunk/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc



More information about the Libstdc++-cvs mailing list