Tighten access specifiers on enumerated_bitset

This commit is contained in:
Kp 2022-07-16 15:26:12 +00:00
parent 1fa56d439c
commit 7f8e074ab0

View file

@ -14,9 +14,11 @@ namespace dcx {
* See d_array.h for a full description.
*/
template <std::size_t N, typename E>
struct enumerated_bitset : std::bitset<N>
class enumerated_bitset : std::bitset<N>
{
using base_type = std::bitset<N>;
public:
using base_type::base_type;
constexpr typename base_type::reference operator[](E position)
{
return this->base_type::operator[](static_cast<std::size_t>(position));