libstdc++: Do not use std::vector<bool>::reference default ctor [PR115098]
commit75ef21665cb924265b818b08babbc7ec3108c876
authorJonathan Wakely <jwakely@redhat.com>
Tue, 27 Aug 2024 12:30:42 +0000 (27 13:30 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 27 Aug 2024 13:20:13 +0000 (27 14:20 +0100)
treefc25c9f69210003d6f533fa5696a63d83fef08eb
parent470a27859d8a47a99f389f1dc6edb82c08b16e21
libstdc++: Do not use std::vector<bool>::reference default ctor [PR115098]

This default constructor was made private by r15-3124-gb25b101bc38000 so
the pretty printer tests need a fix to stop using it. There's no
conforming way to get a default-constructed 'reference' now, e.g. trying
to access an element of a default-constructed std::vector<bool> will
trigger an assertion. Remove the tests, but leave a comment in the
printer code about handling it.

libstdc++-v3/ChangeLog:

PR libstdc++/115098
* python/libstdcxx/v6/printers.py (StdBitReferencePrinter): Add
comment.
* testsuite/libstdc++-prettyprinters/simple.cc: Do not default
construct std::vector<bool>::reference.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/simple.cc
libstdc++-v3/testsuite/libstdc++-prettyprinters/simple11.cc