|
CoreComponents 3.0.0
A Modern C++ Toolkit
|
Select the bits i to j from a word of type T. More...
#include <cc/bits>
Public Member Functions | |
| Bit (T &word) | |
| Create a new bit selector. | |
| Bit (const Bit &)=delete | |
| Delete copy constructor. | |
| Bit & | operator= (const Bit &)=delete |
| Delete copy operator. | |
| operator T () const | |
| Return value of selection | |
| template<class Value > | |
| Bit & | operator= (Value value) |
| Assign a new value to the bit selection. | |
| template<class Value > | |
| Bit & | operator|= (Value value) |
| Combine a new value to the bit selection using the or operator. | |
| template<class Value > | |
| Bit & | operator^= (Value value) |
| Combine a new value to the bit selection using the xor operator. | |
| template<class Value > | |
| Bit & | operator&= (Value value) |
| Combine a new value to the bit selection using the and operator. | |
Select the bits i to j from a word of type T.
| T | Unsigned integer type |
| j | High bit position |
| i | Low bit position |
| Bit | ( | T & | word | ) |
Create a new bit selector.
| word | Word to select bits from |
Delete copy constructor.
Delete copy operator.
| operator T | ( | ) | const |
Return value of selection
| Bit & operator= | ( | Value | value | ) |
Assign a new value to the bit selection.
| Bit & operator|= | ( | Value | value | ) |
Combine a new value to the bit selection using the or operator.
| Bit & operator^= | ( | Value | value | ) |
Combine a new value to the bit selection using the xor operator.
| Bit & operator&= | ( | Value | value | ) |
Combine a new value to the bit selection using the and operator.