So i want bitfields for just a little bit. but i dont want its dependencies. How is it done. I have tried this. but it doesnt seem to work on gdc. :(

struct Color_t {
        static if(__ctfe){
                import std.bitmanip:bitfields;
        }
        mixin(bitfields!(
                uint, "R",    8,
                uint, "G",   8,
                uint, "B",    8,
                uint, "A", 8));
}

Reply via email to