Re:Const all the things?
by moonchrome on Monday January 24, 2022 @07:47AM
(#30056960)
C# requires explicit "out" on call site, I wonder if you could make a macro and lint rules for C++ to require this :) Haven't touched C++ in almost 10 years so not up-to-date on how good/extensible linters are.
[ Parent
| on HN ]
You can create a trivial wrapper:
https://godbolt.org/z/c5YeP6feG
The usual issue with these sort of things is that they are not idiomatic (but then again, there is no single idiomatic C++).edit: std::reference_wrapper is of course the standard blessed way to do this, but still not idiomatic.