Someone calls List.IndexOf(x), but x is not in the list. You're the IndexOf function. What do you return?
Representing error codes in the same space as normal answers doesn't strike me as a particularly good thing to do. You can return a pair of a bool and a size_t. You make the bool false if x is not in the list.
Limiting the size to UInt32MaxValue-1 doesn't seem as bad as wasting an entire half of the space for error messages.
I sometimes use signed integers for things that are essentially indices, so perhaps size_t would be more natural. But then I don't get to do this:
for (int n = 7; n>=0; --n) ...