ROSE 0.11.145.192
Type.h
1// WARNING: Changes to this file must be contributed back to Sawyer or else they will
2// be clobbered by the next update from Sawyer. The Sawyer repository is at
3// https://gitlab.com/charger7534/sawyer.git.
4
5
6
7
8#ifndef Sawyer_Type_H
9#define Sawyer_Type_H
10
11#include <boost/cstdint.hpp>
12
13namespace Sawyer {
14
16namespace Type {
17
19template<size_t nBits> struct Integer {};
20template<> struct Integer<8> { typedef boost::int8_t type; };
21template<> struct Integer<16> { typedef boost::int16_t type; };
22template<> struct Integer<32> { typedef boost::int32_t type; };
23template<> struct Integer<64> { typedef boost::int64_t type; };
24
26template<size_t nBits> struct UnsignedInteger {};
27template<> struct UnsignedInteger<8> { typedef boost::uint8_t type; };
28template<> struct UnsignedInteger<16> { typedef boost::uint16_t type; };
29template<> struct UnsignedInteger<32> { typedef boost::uint32_t type; };
30template<> struct UnsignedInteger<64> { typedef boost::uint64_t type; };
31
32} // namespace
33} // namespace
34
35#endif
Sawyer support library.
A signed integer of particular size.
Definition Type.h:19
An unsigned integer of particular size.
Definition Type.h:26