This code should compile, and if you use 'uint32_t4' directly in the cbuffer instead of the typedef it does. https://godbolt.org/z/4nx4zsMdf The type needs to be desugared before being cast to a ConstantArrayType.