beatsaber-hook icon indicating copy to clipboard operation
beatsaber-hook copied to clipboard

Adapt reference wrappers for `in`/`out`

Open Fernthedev opened this issue 2 years ago • 1 comments

So currently, we use ByRef<T> which works fine for ref/out but in the case that it is in passed, we don't need it to be T but rather const T. While this isn't strictly necessary, it could be nice since it's obvious we can or cannot modify T.

Hopefully, there can be an approach that also does not affect method resolution forcing you to choose between ConstRef and MutRef (coining these names today)

Fernthedev avatar Dec 23 '21 00:12 Fernthedev