Just because the standard refers to ~reference() as a destructor does not mean that it should be provided by the user as no-op {} (how libstdC ++ and SGI / STL do this). It can also be declared by the user as =default or even implicitly defined (how libC ++ does this). Despite this, the standard can be updated to make it an explicit reference to destructor removal. You can make changes to the editorial office (I do not think that this requires a real proposal).
As @BoPersson noted in the comments, std::bitset is a very old component of the standard library. Many of its functions (an implicit constructor from an unsigned integer, a member instead of operator== non-members) precede the standardization of the language in 1998. Shameless plugins: see, for example, this Q & A to discuss how this could happen, and this Q & amp A , why it might break the code if it is fixed.
<rant mode>
The best way out of the std::bitset legacy is a clean break in the namespace experimental . Preferably, it also solves the mixed abstraction std::bitset , which at the same time tries to be a space-optimized version of array<bool> , as well as a set<int> . Ideally, there would be a suggestion for bool_array<N> and a bounded_int_set<N> that provided these abstractions. Similarly, bool_vector<Alloc> (currently known as vector<bool, Alloc> ) and int_set<Alloc> (currently a mixture of boost::dynamic_bitset and boost::container::flat_set<int, Alloc> ).
</rant mode>
source share