Comms CCF
This is a simple communication layer based on COBS, CBOR and FNV-1A
Loading...
Searching...
No Matches
types.hpp File Reference

Simple type utilities e.g. smallest type for given value. More...

#include <stddef.h>
#include <stdint.h>
#include <bit>

Go to the source code of this file.

Classes

struct  Uint< N >
struct  Uint< 8 >
struct  Uint< 16 >
struct  Uint< 32 >
struct  Uint< 64 >
struct  SmallestType< I >

Typedefs

template<size_t N>
using UintT = Uint<N>::Type
template<size_t I>
using SmallestTypeT = SmallestType<I>::Type

Detailed Description

Simple type utilities e.g. smallest type for given value.

Type utilities

When we have some compile-time known value, it is useful to know what is the smallest type required to hold it.