In C++ programming, there are macros for the fixed-width integer type that allow you to obtain minimum and maximum possible values. In this post, we explain these macros for integer constants in modern C++.

Table of Contents

## What are the macros for minimum signed integer constants in modern C++?

Here are the macros for minimum signed integer constants in general form in C++:

Integer Constant | Description |

INT8_MIN | min. value of 8 bits signed integer type |

INT16_MIN | min. value of 16 bits signed integer type |

INT32_MIN | min. value of 32 bits signed integer type |

INT64_MIN | min. value of 64 bits signed integer type |

Here are the macros for minimum signed integer constants in fastest form:

Integer Constant | Description |

INT_FAST8_MIN | min. value of 8 bits fast signed integer type |

INT_FAST16_MIN | min. value of 16 bits fast signed integer type |

INT_FAST32_MIN | min. value of 32 bits fast signed integer type |

INT_FAST64_MIN | min. value of 64 bits fast signed integer type |

Here are the macros for minimum signed integer constants in smallest form:

Integer Constant | Description |

INT_LEAST8_MIN | min. value of 8 bits fast signed integer type |

INT_LEAST16_MIN | min. value of 16 bits fast signed integer type |

INT_LEAST32_MIN | min. value of 32 bits fast signed integer type |

INT_LEAST64_MIN | min. value of 64 bits fast signed integer type |

Integer Constant | Description |

INTMAX_MIN | min. value of `std::intmax_t` |

Integer Constant | Description |

INTPTR_MIN | min. value of `std::intptr_t` |

## What are the macros for the maximum signed integer constants in modern C++?

Here are the macros for maximum signed integer constants in general form in C++:

Integer Constant | Description |

INT8_MAX | max. value of 8 bits signed integer type |

INT16_MAX | max. value of 16 bits signed integer type |

INT32_MAX | max. value of 32 bits signed integer type |

INT64_MAX | max. value of 64 bits signed integer type |

Here are the macros for maximum signed integer constants in fastest form:

Integer Constant | Description |

INT_FAST8_MAX | max. value of 8 bits fast signed integer type |

INT_FAST16_MAX | max. value of 16 bits fast signed integer type |

INT_FAST32_MAX | max. value of 32 bits fast signed integer type |

INT_FAST64_MAX | max. value of 64 bits fast signed integer type |

Here are the macros for maximum signed integer constants in smallest form:

Integer Constant | Description |

INT_LEAST8_MAX | max. value of 8 bits fast signed integer type |

INT_LEAST16_MAX | max. value of 16 bits fast signed integer type |

INT_LEAST32_MAX | max. value of 32 bits fast signed integer type |

INT_LEAST64_MAX | max. value of 64 bits fast signed integer type |

Integer Constant | Description |

INTMAX_MAX | max. value of `std::intmax_t` |

Integer Constant | Description |

INTPTR_MAX | max. value of `std::intptr_t` |

## What are the macros for the minimum unsigned integer constants in modern C++?

Here are the macros for the minimum unsigned integer constants in general form in C++:

Integer Constant | Description |

UINT8_MIN | min. value of 8 bits unsigned integer type |

UINT16_MIN | min. value of 16 bits unsigned integer type |

UINT32_MIN | min. value of 32 bits unsigned integer type |

UINT64_MIN | min. value of 64 bits unsigned integer type |

Here are the macros for minimum unsigned integer constants in fastest form:

Integer Constant | Description |

UINT_FAST8_MIN | min. value of 8 bits fast unsigned integer type |

UINT_FAST16_MIN | min. value of 16 bits fast unsigned integer type |

UINT_FAST32_MIN | min. value of 32 bits fast unsigned integer type |

UINT_FAST64_MIN | min. value of 64 bits fast unsigned integer type |

Here are the macros for minimum unsigned integer constants in smallest form:

Integer Constant | Description |

UINT_LEAST8_MIN | min. value of 8 bits fast unsigned integer type |

UINT_LEAST16_MIN | min. value of 16 bits fast unsigned integer type |

UINT_LEAST32_MIN | min. value of 32 bits fast unsigned integer type |

UINT_LEAST64_MIN | min. value of 64 bits fast unsigned integer type |

Integer Constant | Description |

UINTMAX_MIN | min. value of `std::uintmax_t` |

Integer Constant | Description |

UINTPTR_MIN | min. value of `std::uintptr_t` |

## What are the macros for the maximum unsigned integer constants in modern C++?+

Here are the macros for the maximum signed integer constants in general form in C++.

Integer Constant | Description |

UINT8_MAX | max. value of 8 bits unsigned integer type |

UINT16_MAX | max. value of 16 bits unsigned integer type |

UINT32_MAX | max. value of 32 bits unsigned integer type |

UINT64_MAX | max. value of 64 bits unsigned integer type |

Here are the macros for the maximum unsigned integer constants in fastest form:

Integer Constant | Description |

UINT_FAST8_MAX | max. value of 8 bits fast unsigned integer type |

UINT_FAST16_MAX | max. value of 16 bits fast unsigned integer type |

UINT_FAST32_MAX | max. value of 32 bits fast unsigned integer type |

UINT_FAST64_MAX | max. value of 64 bits fast unsigned integer type |

Here are the macros for maximum unsigned integer constants in smallest form:

Integer Constant | Description |

UINT_LEAST8_MAX | max. value of 8 bits fast unsigned integer type |

UINT_LEAST16_MAX | max. value of 16 bits fast unsigned integer type |

UINT_LEAST32_MAX | max. value of 32 bits fast unsigned integer type |

UINT_LEAST64_MAX | max. value of 64 bits fast unsigned integer type |

Integer Constant | Description |

UINTMAX_MAX | max. value of `std::uintmax_t` |

Integer Constant | Description |

UINTPTR_MAX | max. value of `std::uintptr_t` |

If you are looking more about Declared Constants, you can follow this link: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Declared_Constants

**C++ Builder is the easiest and fastest C and C++ IDE for building simple or professional applications on the Windows, MacOS, iOS & Android operating systems. It is also easy for beginners to learn with its wide range of samples, tutorials, help files, and LSP support for code. RAD Studio’s C++ Builder version comes with the award-winning VCL framework for high-performance native Windows apps and the powerful FireMonkey (FMX) framework for cross-platform UIs.**

Design. Code. Compile. Deploy.

Start Free Trial

Free C++Builder Community Edition