Navigation

Operators and Keywords

Function List:

C++ API

xsize.h File Reference

#include <stddef.h>
#include <limits.h>
#include <stdint.h>
Include dependency graph for xsize.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define xcast_size_t(N)   ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
#define xtimes(N, ELSIZE)   ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
#define size_overflow_p(SIZE)   ((SIZE) == SIZE_MAX)
#define size_in_bounds_p(SIZE)   ((SIZE) != SIZE_MAX)

Define Documentation

#define size_in_bounds_p (   SIZE  )     ((SIZE) != SIZE_MAX)
#define size_overflow_p (   SIZE  )     ((SIZE) == SIZE_MAX)
#define xcast_size_t (   N  )     ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
#define xtimes (   N,
  ELSIZE 
)    ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines