3 ms·
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
by moonchrome 5y ago
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.
- gpderetta 5y agoYou 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.