Skip to content

Instantly share code, notes, and snippets.

@kterhorst
kterhorst / tagging.h
Created March 16, 2020 23:14
C/C++ const(expr) tag functions
#ifdef __cplusplus
#include <cstddef>
#include <cstdint>
#else
#include <stddef.h>
#include <stdint.h>
#endif
/// Fastest, C, non-constexpr way to create a 64bit tag.
#define MAKE_TAG8(a, b) ((uint64_t)(a) | ((uint64_t)(b)) << 32ULL)