Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Index.h File Reference
#include "GrayCore.h"

Go to the source code of this file.

Namespaces

 Gray
 < The main namespace for all Core functions.
 

Macros

#define _SIZEOF_PTR   4
 bytes = sizeof(void*) for __DECL_ALIGN macro. Can't do sizeof(x). uintptr_t More...
 
#define IS_INDEX_BAD(i, q)   ((COUNT_t)(i)>=(COUNT_t)(q))
 cast the (likely) int to unsigned to check for negatives. More...
 
#define IS_INDEX_GOOD(i, q)   ((COUNT_t)(i)<(COUNT_t)(q))
 cast the (likely) int to unsigned to check for negatives. More...
 
#define IS_INDEX_BAD_ARRAY(i, a)   IS_INDEX_BAD(i,_countof(a))
 
#define IS_INDEX_GOOD_ARRAY(i, a)   IS_INDEX_GOOD(i,_countof(a))
 
#define _sizeofm(s, m)   sizeof(((s *)0)->m)
 size_t of a structure member/field (like offsetof()) nullptr More...
 

Typedefs

typedef int Gray::ITERATE_t
 like size_t but signed More...
 
typedef size_t Gray::COUNT_t
 like size_t but a count of things that might NOT be bytes. ASSUME unsigned. _countof(x) More...
 

Variables

const ITERATE_t Gray::k_ITERATE_BAD = -1
 

Detailed Description

Difference of 2 pointers in memory.

Macro Definition Documentation

◆ _SIZEOF_PTR

#define _SIZEOF_PTR   4

bytes = sizeof(void*) for __DECL_ALIGN macro. Can't do sizeof(x). uintptr_t

◆ _sizeofm

#define _sizeofm (   s,
 
)    sizeof(((s *)0)->m)

size_t of a structure member/field (like offsetof()) nullptr

◆ IS_INDEX_BAD

#define IS_INDEX_BAD (   i,
 
)    ((COUNT_t)(i)>=(COUNT_t)(q))

cast the (likely) int to unsigned to check for negatives.

◆ IS_INDEX_BAD_ARRAY

#define IS_INDEX_BAD_ARRAY (   i,
 
)    IS_INDEX_BAD(i,_countof(a))

◆ IS_INDEX_GOOD

#define IS_INDEX_GOOD (   i,
 
)    ((COUNT_t)(i)<(COUNT_t)(q))

cast the (likely) int to unsigned to check for negatives.

◆ IS_INDEX_GOOD_ARRAY

#define IS_INDEX_GOOD_ARRAY (   i,
 
)    IS_INDEX_GOOD(i,_countof(a))