fizyk20/generic-array

const arr! support

tarcieri opened this issue · 1 comments

It looks like arr! presently cannot be used in a const context:

error[E0015]: calls in constants are limited to constant functions, tuple structs and tuple variants

Would it be possible to const-ify the constructor code the macro generates?

Small update, even in 2022 this still requires #![feature(const_ptr_read, const_refs_to_cell)] to accomplish, but is technically possible on nightly.

If this is still strongly desired, perhaps a nightly feature-flag could be used to enable it. @fizyk20 your thoughts?