Wow, that's super weird:

std::vector<bool> v;
const auto b = v[0];
b = true;   // o_0

On Fri, Oct 7, 2022 at 3:40 PM blacktea hamburger via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
But their name is "reference". Also, std::vector<bool>::reference has a const assignment operator:

constexpr const reference& operator=(bool x) const noexcept;

On Fri, Oct 7, 2022 at 8:34 PM Oleksandr Koval <oleksandr.koval.dev@gmail.com> wrote:
I think the intent here is to mimic value semantics since assignment actually changes referenced value. Making those functions `const` would be confusing.

On Fri, Oct 7, 2022 at 2:42 PM blacktea hamburger via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
std::vector<bool>::reference and std::bitset::reference are both proxies, so even if they themselves are const, they can still be used to change the bit they reference.

Are there any issues?
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals


--
Regards,
Oleksandr Koval.
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals


--
Regards,
Oleksandr Koval.