/*
tagged union
for nullable types, e.g. nullable int
either an int is present (tagged as SOME) or absent (tagged as NONE)
*/
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
enum tag {
NONE,
SOME
};
struct opt
{
enum tag type;
union
{
struct
{
int64_t item;
};
struct
{
void* item;
};
};
};
int main()
{
return 0;
}