Botan 3.9.0
Crypto and TLS for C&
Botan::bitvector_base< AllocatorT >::bitref< BlockT > Class Template Referencefinal

#include <bitvector.h>

Public Member Functions

template<std::unsigned_integral T>
constexpr T as () const noexcept
constexpr CT::Choice as_choice () const noexcept
constexpr bool is_set () const noexcept
constexpr operator bool () const noexcept

Protected Attributes

BlockT & m_block
BlockT m_mask

Detailed Description

template<template< typename > typename AllocatorT>
template<typename BlockT>
class Botan::bitvector_base< AllocatorT >::bitref< BlockT >

Wraps a constant reference into the bitvector. Bit can be accessed but not modified.

Definition at line 307 of file bitvector.h.

Member Function Documentation

◆ as()

template<template< typename > typename AllocatorT>
template<typename BlockT>
template<std::unsigned_integral T>
T Botan::bitvector_base< AllocatorT >::bitref_base< BlockT >::as ( ) const
inlineconstexprnoexceptinherited

Definition at line 288 of file bitvector.h.

288 {
289 return static_cast<T>(is_set());
290 }

◆ as_choice()

template<template< typename > typename AllocatorT>
template<typename BlockT>
CT::Choice Botan::bitvector_base< AllocatorT >::bitref_base< BlockT >::as_choice ( ) const
inlineconstexprnoexceptinherited

Definition at line 292 of file bitvector.h.

292 {
293 return CT::Choice::from_int(static_cast<BlockT>(m_block & m_mask));
294 }
static constexpr Choice from_int(T v)
Definition ct_utils.h:314

◆ is_set()

template<template< typename > typename AllocatorT>
template<typename BlockT>
bool Botan::bitvector_base< AllocatorT >::bitref_base< BlockT >::is_set ( ) const
inlineconstexprnoexceptinherited

Definition at line 285 of file bitvector.h.

285{ return (m_block & m_mask) > 0; }

◆ operator bool()

template<template< typename > typename AllocatorT>
template<typename BlockT>
Botan::bitvector_base< AllocatorT >::bitref_base< BlockT >::operator bool ( ) const
inlineconstexprnoexceptinherited

Definition at line 283 of file bitvector.h.

283{ return is_set(); }

Member Data Documentation

◆ m_block

template<template< typename > typename AllocatorT>
template<typename BlockT>
BlockT& Botan::bitvector_base< AllocatorT >::bitref_base< BlockT >::m_block
protectedinherited

Definition at line 297 of file bitvector.h.

◆ m_mask

template<template< typename > typename AllocatorT>
template<typename BlockT>
BlockT Botan::bitvector_base< AllocatorT >::bitref_base< BlockT >::m_mask
protectedinherited

Definition at line 298 of file bitvector.h.


The documentation for this class was generated from the following file: