On Tuesday, 30 October 2018 at 11:23:48 UTC, aliak wrote:
Guess I could do that. But would there be a difference if I just declared the restArgs as non const then? Given the objective is "set this var to point to this thing and not allow it to be set to point to anything else".
The difference with const is that you wouldn't be able to modify the array itself (by adding or removing arguments for example). But yes, you can still re-assign it multiple times using Rebindable, so the lambda solution is a better idea indeed.