SafeShifter< overflow > Class Template Reference

Safely shift values when undefined behavior could occur. More...

## Detailed Description

### template<bool overflow>
class SafeShifter< overflow >

Safely shift values when undefined behavior could occur.

Template Parameters

  overflow | boolean flag indicating if overflow is present

SafeShifter safely shifts values when undefined behavior could occur under C/C++ rules. The class behaves much like a saturating arithmetic class, clamping values rather than allowing the compiler to remove undefined behavior.

See also
  SafeShifter<true>, SafeShifter<false>

Definition at line 2279 of file misc.h.

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

- misc.h