[libc++][format] Fixes formatting vector<bool>
authorMark de Wever <koraq@xs4all.nl>
Fri, 17 Feb 2023 17:55:48 +0000 (18:55 +0100)
committerMark de Wever <koraq@xs4all.nl>
Sat, 4 Mar 2023 12:59:49 +0000 (13:59 +0100)
commit7e4639d28f44dd8988ddb5fcc6063de96e3539cd
treea20ff2628dc6ea09396e480bf6e74246b7751ddc
parentfaacf8bca33716a07c74a4996e87df1bc673d7ea
[libc++][format] Fixes formatting vector<bool>

Formatting a const qualified vector<bool> fails to work on libc++. This
is due to our non-conforming type for vector<bool>::const_reference. The
type is a __bit_const_reference<vector> instead of a bool. (This is
fixed in ABI v2.)

This fixes this formatter and enables the test written for it.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D144279
libcxx/include/__bit_reference
libcxx/test/std/containers/container.adaptors/container.adaptors.format/format.functions.tests.h
libcxx/test/std/containers/sequences/vector.bool/vector.bool.fmt/format.functions.tests.h
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp