https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90945

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Jun 19 22:57:06 2019
New Revision: 272490

URL: https://gcc.gnu.org/viewcvs?rev=272490&root=gcc&view=rev
Log:
Have std::vector printer's iterator return bool for vector<bool>

Have the pretty-printer for 'std::vector<bool>' return a
value of type 'bool' rather than an 'int'.

This way, the type is clear and that can be used for better
display and a 'gdb.Value' constructed from the returned value
will have type 'bool' again, not e.g. 'long long' as happened
previously (at least with GDB 8.2.1 on amd64).

2019-06-19  Michael Weghorn  <[email protected]>
            Jonathan Wakely  <[email protected]>

        PR libstdc++/90945
        * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
        values of type bool for vector<bool> elements.
        * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
        * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.

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

Reply via email to