cgv
Loading...
Searching...
No Matches
cgv::type::bool32_t Class Reference

Class type that emulates the primitive bool data type by storing its value as a 32-bit integer. More...

#include <bool32_t.h>

Public Member Functions

 bool32_t (const bool32_t &)=default
 
bool32_toperator= (const bool32_t &)=default
 
 bool32_t (bool32_t &&) noexcept=default
 
bool32_toperator= (bool32_t &&) noexcept=default
 
 bool32_t (const bool &other)
 
bool32_toperator= (const bool &other)
 
 bool32_t (bool &&other) noexcept
 
bool32_toperator= (bool &&other) noexcept
 
 operator bool () const
 

Detailed Description

Class type that emulates the primitive bool data type by storing its value as a 32-bit integer.

Allows representing boolean values with a size and alignment of 4 bytes. Is implicitly convertible to bool to enable default operator behaviour. Typical uses include using this class instead of the raw bool type to avoiding the specialization and packing of std::vector and to allow alternative struct packing.

Definition at line 14 of file bool32_t.h.

Constructor & Destructor Documentation

◆ bool32_t() [1/2]

cgv::type::bool32_t::bool32_t ( const bool &  other)
inline

Definition at line 23 of file bool32_t.h.

◆ bool32_t() [2/2]

cgv::type::bool32_t::bool32_t ( bool &&  other)
inlinenoexcept

Definition at line 32 of file bool32_t.h.

Member Function Documentation

◆ operator bool()

cgv::type::bool32_t::operator bool ( ) const
inline

Definition at line 41 of file bool32_t.h.

◆ operator=() [1/2]

bool32_t & cgv::type::bool32_t::operator= ( bool &&  other)
inlinenoexcept

Definition at line 35 of file bool32_t.h.

◆ operator=() [2/2]

bool32_t & cgv::type::bool32_t::operator= ( const bool &  other)
inline

Definition at line 26 of file bool32_t.h.


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