Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
6.6
-
None
Description
Currently, we have many places in the code base which use int to represent indices. We should port them to enum classes as
- arithmetic on indices doesn't make sense (in general)
- separate indices should have separate types to avoid confusion; that is especially important given that we have some functions taking more than one index type
- using enums gives us a natural way to give invalid/default/other special states a name (instead of passing around magic numbers like -1 or INT_MAX)