Template Class bitset

Nested Relationships

Nested Types

Class Documentation

template<typename E, typename Index = default_indexing<E>>
class bitset

Public Types

using index_type = Index
using container_type = std::array<base_type, base_type_count>
using reference = reference_impl<>
using const_reference = reference_impl<const bitset*>

Public Functions

inline explicit constexpr bitset(detail::raw_access_t = raw_access) noexcept
inline explicit constexpr bitset(detail::raw_access_t, unsigned long long val)
inline explicit constexpr bitset(detail::raw_access_t, string_view sv, string_view::size_type pos = 0, string_view::size_type n = string_view::npos, char_type zero = static_cast<char_type>('0'), char_type one = static_cast<char_type>('1'))
inline explicit constexpr bitset(detail::raw_access_t, const char_type *str, std::size_t n = ~std::size_t{0}, char_type zero = static_cast<char_type>('0'), char_type one = static_cast<char_type>('1'))
inline constexpr bitset(std::initializer_list<E> starters)
template<typename V, std::enable_if_t<std::is_same_v<V, E> && magic_enum::detail::subtype_v<V> == magic_enum::detail::enum_subtype::flags, int> = 0>
inline explicit constexpr bitset(V starter)
template<typename Cmp = std::equal_to<>>
inline explicit constexpr bitset(string_view sv, Cmp &&cmp = {}, char_type sep = static_cast<char_type>('|'))
inline constexpr bool operator[](E pos) const
inline constexpr reference operator[](E pos)
inline constexpr bool test(E pos) const
inline constexpr bool all() const noexcept
inline constexpr bool any() const noexcept
inline constexpr bool none() const noexcept
inline constexpr std::size_t count() const noexcept
inline constexpr std::size_t size() const noexcept
inline constexpr std::size_t max_size() const noexcept
inline constexpr bitset &operator&=(const bitset &other) noexcept
inline constexpr bitset &operator|=(const bitset &other) noexcept
inline constexpr bitset &operator^=(const bitset &other) noexcept
inline constexpr bitset operator~() const noexcept
inline constexpr bitset &set() noexcept
inline constexpr bitset &set(E pos, bool value = true)
inline constexpr bitset &reset() noexcept
inline constexpr bitset &reset(E pos)
inline constexpr bitset &flip() noexcept
template<typename V = E>
inline explicit constexpr operator std::enable_if_t<magic_enum::detail::subtype_v<V> == magic_enum::detail::enum_subtype::flags, E>() const
inline string to_string(char_type sep = static_cast<char_type>('|')) const
inline string to_string(detail::raw_access_t, char_type zero = static_cast<char_type>('0'), char_type one = static_cast<char_type>('1')) const
inline constexpr unsigned long long to_ullong(detail::raw_access_t raw) const
inline constexpr unsigned long long to_ulong(detail::raw_access_t raw) const

Friends

inline friend constexpr friend bool operator== (const bitset &lhs, const bitset &rhs) noexcept
inline friend constexpr friend bool operator!= (const bitset &lhs, const bitset &rhs) noexcept
inline friend constexpr friend bitset operator& (const bitset &lhs, const bitset &rhs) noexcept
inline friend constexpr friend bitset operator| (const bitset &lhs, const bitset &rhs) noexcept
inline friend constexpr friend bitset operator^ (const bitset &lhs, const bitset &rhs) noexcept
inline friend std::ostream &operator<<(std::ostream &o, const bitset &bs)
inline friend std::istream &operator>>(std::istream &i, bitset &bs)