]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Add pretty printer for std::initializer_list
authorPhilipp Fent <fent@in.tum.de>
Mon, 25 Apr 2022 12:03:31 +0000 (13:03 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 25 Apr 2022 12:32:04 +0000 (13:32 +0100)
commit71999fde2a454d1fa149e63825d8edbe0748c911
treeff6a87cb294117a3d5a0b70de6d392a3dc3badfb
parent6cc26f3037a18b9a958b4ac2a1363149a7fccd39
libstdc++: Add pretty printer for std::initializer_list

Re-using the std::span printer, this now shows the contents of the
initializer list instead of the pointer and length members.

Signed-off-by: Philipp Fent <fent@in.tum.de>
libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
Rename as iterator.
(StdInitializerListPrinter): Define new printer.
(build_libstdcxx_dictionary): Register new printer.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
initializer_list.
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc