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

#include <bitvector.h>

Public Member Functions

template<std::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 305 of file bitvector.h.

Member Function Documentation

◆ as()

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

Definition at line 286 of file bitvector.h.

286 {
287 return static_cast<T>(is_set());
288 }
FE_25519 T
Definition ge.cpp:34

◆ 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 290 of file bitvector.h.

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

◆ 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 283 of file bitvector.h.

283{ 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 281 of file bitvector.h.

281{ 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 295 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 296 of file bitvector.h.


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