3 ms·
If goo doesn't throw, why not declare it nothrow? Although I still don't see why, in your example, one of the variables cannot be elided even if goo does throw
by int_19h 10y ago
If goo doesn't throw, why not declare it nothrow?
Although I still don't see why, in your example, one of the variables cannot be elided even if goo does throw. Since there's no point at which address of r is taken, much less escapes the scope, it should always be safe to elide r and just return s, no?
- deleted 10y ago[deleted]