Make it a compile-time error to pass an int/unsigned/etc to
fromRawInteger.
Hopefully this prevents errors of the form:
```
for (unsigned ID : getVarLocs()) {
auto VL = LocMap[LocIndex::fromRawInteger(ID)];
...
```
return (static_cast<uint64_t>(Location) << 32) | Index;
}
- static LocIndex fromRawInteger(uint64_t ID) {
+ template<typename IntT> static LocIndex fromRawInteger(IntT ID) {
+ static_assert(std::is_unsigned<IntT>::value &&
+ sizeof(ID) == sizeof(uint64_t),
+ "Cannot convert raw integer to LocIndex");
return {static_cast<uint32_t>(ID >> 32), static_cast<uint32_t>(ID)};
}