This fixes a compilation error in debug mode, due to std::_Bit_reference not being defined, because it's in namespace std::__cxx1998 instead. We can refer to it as vector::reference instead, which always works. That fixes some compilation errors in debug mode, but the tests fail at run-time instead because the printers for vector helpers are only registered for the std namespace, not std::__cxx1998. That is fixed by using add_container to register the printers instead of add_version, as the former registers them in the std and std::__cxx1998 namespaces. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (StdBitReferencePrinter): Use 'std::vector::reference' as type name, not _Bit_reference. (build_libstdcxx_dictionary): Register printers for vector types in debug mode too. * testsuite/libstdc++-prettyprinters/simple.cc: Adjust expected output for invalid _Bit_reference. Use vector::reference instead of _Bit_reference. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. Tested powerpc64le-linux. Committed to trunk.