]> git.ipfire.org Git - thirdparty/gcc.git/commit
Have std::vector printer's iterator return bool for vector<bool>
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Jun 2019 22:57:06 +0000 (22:57 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Jun 2019 22:57:06 +0000 (22:57 +0000)
commit6c7d761a3f5fd7d19795d1d4b9b027a04b3fe88b
treeab74e6ba1f45dcc88d0e4ce6879ba03c6171d02e
parent100ba82c20a03d6ff316eb34fb46fe29e5c920fc
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  <m.weghorn@posteo.de>
    Jonathan Wakely  <jwakely@redhat.com>

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272490 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc