Closed
Description
We currently forbid function pointers as const parameter types, so the following causes an error:
fn foo<const N: fn() -> usize>() {}
The reason we forbid this because comparing function pointers is not deterministic iirc.
Does this non-determinism only occur at runtime, and if so, are there any reasons why we must not allow function pointers as const param types? I think ctfe is fully deterministic wrt function pointers.
Metadata
Metadata
Assignees
Labels
No labels