Regina Calculation Engine
Public Types | Static Public Member Functions | List of all members
regina::BitManipulatorBySize< T, size > Class Template Reference

Contains implementation details for BitManipulator where we optimise according to the size of the underlying data type. More...

#include <utilities/bitmanip.h>

Public Types

enum  { specialised = 0 }
 

Static Public Member Functions

static int bits (T x)
 Returns the number of bits that are set to 1 in the given integer. More...
 

Detailed Description

template<typename T, unsigned size = sizeof(T)>
class regina::BitManipulatorBySize< T, size >

Contains implementation details for BitManipulator where we optimise according to the size of the underlying data type.

End users should use the BitManipulator class, not this class.

Precondition
Type T is an unsigned integral numeric type.
The argument size is a power of two, and is at most sizeof(T).
Template Parameters
Tan unsigned integral numeric type, which we treat as a sequence of true and/or false bits.
sizethe number of bytes of T to examine. Any higher-order bits will be ignored by the implementations in this class.

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

Copyright © 1999-2018, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).