Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::uint1_t Class Reference

A 1-bit unsigned integer type. More...

#include <uint1.hpp>

Public Member Functions

 uint1_t (const uint1_t &other)=default
 
uint1_toperator= (const uint1_t &other)=default
 
constexpr uint1_t () noexcept
 
constexpr uint1_t (bool b) noexcept
 
template<typename T , typename = std::enable_if_t<std::is_integral_v<T>>>
constexpr uint1_t (T v) noexcept
 
constexpr uint1_t operator+ (const uint1_t &other) const noexcept
 
constexpr uint1_t operator- (const uint1_t &other) const noexcept
 
constexpr uint1_t operator* (const uint1_t &other) const noexcept
 
constexpr uint1_t operator/ (const uint1_t &other) const noexcept
 
constexpr uint1_t operator- () const noexcept
 
constexpr uint1_t operator& (const uint1_t &other) const noexcept
 
constexpr uint1_t operator| (const uint1_t &other) const noexcept
 
constexpr uint1_t operator^ (const uint1_t &other) const noexcept
 
constexpr uint1_t operator~ () const noexcept
 
constexpr uint1_t operator<< (const uint1_t &other) const noexcept
 
constexpr uint1_t operator>> (const uint1_t &other) const noexcept
 
constexpr bool operator== (const uint1_t &other) const noexcept=default
 
constexpr bool operator!= (const uint1_t &other) const noexcept=default
 
constexpr bool operator< (const uint1_t &other) const noexcept
 
constexpr bool operator<= (const uint1_t &other) const noexcept
 
constexpr bool operator> (const uint1_t &other) const noexcept
 
constexpr bool operator>= (const uint1_t &other) const noexcept
 
constexpr uint8_t value () const noexcept
 
constexpr operator uint8_t () const noexcept
 

Private Attributes

bool value_
 

Detailed Description

A 1-bit unsigned integer type.

This type is used to represent boolean values in a way that's compatible with the TaggedValue system. It behaves like a regular integer type but only allows values 0 and 1.

Definition at line 15 of file uint1.hpp.

Constructor & Destructor Documentation

◆ uint1_t() [1/4]

bb::avm2::uint1_t::uint1_t ( const uint1_t other)
default

◆ uint1_t() [2/4]

constexpr bb::avm2::uint1_t::uint1_t ( )
inlineconstexprnoexcept

Definition at line 21 of file uint1.hpp.

◆ uint1_t() [3/4]

constexpr bb::avm2::uint1_t::uint1_t ( bool  b)
inlineconstexprnoexcept

Definition at line 26 of file uint1.hpp.

◆ uint1_t() [4/4]

template<typename T , typename = std::enable_if_t<std::is_integral_v<T>>>
constexpr bb::avm2::uint1_t::uint1_t ( v)
inlineconstexprnoexcept

Definition at line 32 of file uint1.hpp.

Member Function Documentation

◆ operator uint8_t()

constexpr bb::avm2::uint1_t::operator uint8_t ( ) const
inlineconstexprnoexcept

Definition at line 63 of file uint1.hpp.

◆ operator!=()

constexpr bool bb::avm2::uint1_t::operator!= ( const uint1_t other) const
constexprdefaultnoexcept

◆ operator&()

constexpr uint1_t bb::avm2::uint1_t::operator& ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 44 of file uint1.hpp.

◆ operator*()

constexpr uint1_t bb::avm2::uint1_t::operator* ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 39 of file uint1.hpp.

◆ operator+()

constexpr uint1_t bb::avm2::uint1_t::operator+ ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 37 of file uint1.hpp.

◆ operator-() [1/2]

constexpr uint1_t bb::avm2::uint1_t::operator- ( ) const
inlineconstexprnoexcept

Definition at line 41 of file uint1.hpp.

◆ operator-() [2/2]

constexpr uint1_t bb::avm2::uint1_t::operator- ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 38 of file uint1.hpp.

◆ operator/()

constexpr uint1_t bb::avm2::uint1_t::operator/ ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 40 of file uint1.hpp.

◆ operator<()

constexpr bool bb::avm2::uint1_t::operator< ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 56 of file uint1.hpp.

◆ operator<<()

constexpr uint1_t bb::avm2::uint1_t::operator<< ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 50 of file uint1.hpp.

◆ operator<=()

constexpr bool bb::avm2::uint1_t::operator<= ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 57 of file uint1.hpp.

◆ operator=()

uint1_t & bb::avm2::uint1_t::operator= ( const uint1_t other)
default

◆ operator==()

constexpr bool bb::avm2::uint1_t::operator== ( const uint1_t other) const
constexprdefaultnoexcept

◆ operator>()

constexpr bool bb::avm2::uint1_t::operator> ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 58 of file uint1.hpp.

◆ operator>=()

constexpr bool bb::avm2::uint1_t::operator>= ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 59 of file uint1.hpp.

◆ operator>>()

constexpr uint1_t bb::avm2::uint1_t::operator>> ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 51 of file uint1.hpp.

◆ operator^()

constexpr uint1_t bb::avm2::uint1_t::operator^ ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 46 of file uint1.hpp.

◆ operator|()

constexpr uint1_t bb::avm2::uint1_t::operator| ( const uint1_t other) const
inlineconstexprnoexcept

Definition at line 45 of file uint1.hpp.

◆ operator~()

constexpr uint1_t bb::avm2::uint1_t::operator~ ( ) const
inlineconstexprnoexcept

Definition at line 47 of file uint1.hpp.

◆ value()

constexpr uint8_t bb::avm2::uint1_t::value ( ) const
inlineconstexprnoexcept

Definition at line 62 of file uint1.hpp.

Member Data Documentation

◆ value_

bool bb::avm2::uint1_t::value_
private

Definition at line 66 of file uint1.hpp.


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