kblib 0.2.3
General utilities library for modern C++
kblib::detail_bits::bitfield_proxy< Parent, ReturnT, Set, Get > Struct Template Reference

A proxy reference type for BITFIELD-declared bitfields. More...

#include <kblib/bits.h>

Public Member Functions

constexpr auto operator= (ReturnT val) noexcept -> ReturnT
 
constexpr operator ReturnT () const noexcept
 

Public Attributes

Parent * p
 

Detailed Description

template<typename Parent, typename ReturnT, ReturnT(Parent::*)(ReturnT) noexcept Set, ReturnT(Parent::*)() const noexcept Get>
struct kblib::detail_bits::bitfield_proxy< Parent, ReturnT, Set, Get >

A proxy reference type for BITFIELD-declared bitfields.

It may be assigned to, or it may be used as a prvalue of type ReturnT. Unlike most proxy references, this is actually not that dissimilar to a language bitfield, which has only those capabilities. Like all other proxy references, it should not generally be bound to an auto variable.

Definition at line 475 of file bits.h.

Member Function Documentation

◆ operator ReturnT()

template<typename Parent , typename ReturnT , ReturnT(Parent::*)(ReturnT) noexcept Set, ReturnT(Parent::*)() const noexcept Get>
constexpr kblib::detail_bits::bitfield_proxy< Parent, ReturnT, Set, Get >::operator ReturnT ( ) const
inlineconstexprnoexcept

Definition at line 480 of file bits.h.

◆ operator=()

template<typename Parent , typename ReturnT , ReturnT(Parent::*)(ReturnT) noexcept Set, ReturnT(Parent::*)() const noexcept Get>
constexpr auto kblib::detail_bits::bitfield_proxy< Parent, ReturnT, Set, Get >::operator= ( ReturnT  val) -> ReturnT
inlineconstexprnoexcept

Definition at line 477 of file bits.h.

Member Data Documentation

◆ p

template<typename Parent , typename ReturnT , ReturnT(Parent::*)(ReturnT) noexcept Set, ReturnT(Parent::*)() const noexcept Get>
Parent* kblib::detail_bits::bitfield_proxy< Parent, ReturnT, Set, Get >::p

Definition at line 476 of file bits.h.


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