[PATCH 1/2] libstdc++: Count pretty-printed tuple elements from 0 not 1

2021-06-14 Thread Paul Smith via Gcc-patches
Show 0-based offsets for std::tuple members, to match with std::get. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (StdTuplePrinter): don't increment self.count until after generating the result string. --- libstdc++-v3/python/libstdcxx/v6/printers.py | 13 +++

[PATCH 2/2] libstdc++: Use template form for pretty-printing tuple elements

2021-06-14 Thread Paul Smith via Gcc-patches
std::tuple elements are retrieved via std::get<> (template) not [] (array); have the generated output string match this. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (StdTuplePrinter): Use <> not []. --- The previous patch seems uncontroversial to me. I don't know about this