Generic Image Library: packed_channel_reference

###  | #  |

Functions
packed_channel_reference
Channel » Models » scoped_channel_value » packed_channel_value

## Functions
template<typename BF , int FB, int NB, bool M, typename R >
void | swap (boost::gil::packed_channel_reference< BF, FB, NB, M > const x, R &y)
| swap for packed_channel_reference
template<typename BF , int FB, int NB, bool M>
void | swap (typename boost::gil::packed_channel_reference< BF, FB, NB, M >::value_type &x, boost::gil::packed_channel_reference< BF, FB, NB, M > const y)
| swap for packed_channel_reference
template<typename BF , int FB, int NB, bool M>
void | swap (boost::gil::packed_channel_reference< BF, FB, NB, M > const x, boost::gil::packed_channel_reference< BF, FB, NB, M > const y)
| swap for packed_channel_reference

## Detailed Description

The value of a subbyte channel. Models: ChannelValueConcept

Represents a reference proxy to a channel operating over a bit range whose offset is fixed at compile time. Models ChannelConcept Example:

// Reference to a 2-bit channel starting at bit 1 (i.e. the second bit)
using bits2_1_ref_t = packed_channel_reference<uint16_t,1,2,true> const;
uint16_t data=0;
bits2_1_ref_t channel_ref(&data);
channel_ref = channel_traits<bits2_1_ref_t>::max_value(); // == 3
assert(data == 6); // == 3<<1 == 6