diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-05-14 12:17:18 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-05-14 12:17:18 +0100 |
commit | e25f488d603a6bd7570c1ffdfd9572e4b8a645de (patch) | |
tree | ff1a79dec41d39f4ee7792d10c198606b8877d59 /libcpp/include | |
parent | 1b18663e0fbd6e253feca9e1f29e6f5b5538408d (diff) | |
download | gcc-e25f488d603a6bd7570c1ffdfd9572e4b8a645de.zip gcc-e25f488d603a6bd7570c1ffdfd9572e4b8a645de.tar.gz gcc-e25f488d603a6bd7570c1ffdfd9572e4b8a645de.tar.bz2 |
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.
From-SVN: r271159
Diffstat (limited to 'libcpp/include')
0 files changed, 0 insertions, 0 deletions