<How do I adapt the `ap_uint` type so it can be us...
# community-feeds
r
How do I adapt the `ap_uint` type so it can be used in a union? #ifndef _ENTRY #define _ENTRY #include #include "ap_int.h" struct US0 { ap_uint tag; union { struct { ap_uint v0; } case1; // Some }; }; US0 US0_0() { // None US0 x; x.tag = 0; return x; } US0 US0_1(ap_uint v0) { // Some US0 x; x.tag = 1; x.case1.v0 = v0; return x; } int32_t entry(){ ap_uint v0; v0 = 0; US0 v1; v1 = US0_1(v0); return 0l; } #endif I am working on compiling a functional language to the C++...