C++ Logo

std-discussion

Advanced search

Should we backport const-qualified operator= to old modes as a part of P3612R1 Harmonize proxy-reference operations?

From: F. v.S. <de34_at_[hidden]>
Date: Wed, 4 Mar 2026 05:47:36 +0000
In C++23, P2321R2 "zip" added const-qualified operator= to vector<bool>::reference. Recently, P3612R1 "Harmonize proxy-reference operations" also generalized the addition to bitset::reference for resolving LWG4187. Some implementors thought that such addition should be backported to old modes, see https://github.com/microsoft/STL/pull/5848.

However, I understood correctly, P3612R1 didn't touch backporting const-qualified operator= of vector<bool>::reference, and it was perhaps intended that const-qualified operator= should be consistently available or unavailable for vector<bool>::reference and bitset::reference in each standard mode.

Could we confirm that whether such IMO excessive backport was intentional? It's a bit unfortunate that this doesn't fit into an LWG issue because C++26 has these assignment operators anyway.


Thanks,
F.v.S.

Received on 2026-03-04 05:47:45