Frist Draft (in this forum): Enum Parameters

Quirin Schroll qs.il.paperinik at gmail.com
Thu Apr 25 17:56:59 UTC 2024


https://github.com/Bolpat/DIPs/blob/2bfef0b05e99c5448b416078da2e743482e3193d/DIPs/1NNN-QFS.md

This supersedes my idea of static indexing. The static indexing 
DIP draft even said that if some way to pass values as 
compile-time constants to functions, that would supersede it.

**Abstract**
On function templates, allow `enum` to be used as a function 
parameter storage class and a member function attribute. 
Arguments binding to `enum` parameters must be compile-time 
constants, as if template value parameters. With `auto enum`, 
“compile-time-ness” is determined from argument (cf. `auto ref`) 
and queried via a trait.



More information about the dip.development mailing list