Commit 2abaa8a
committed
Fix bug re: return type of
Just a tiny bugfix I spotted: The `f(un)lockfile` wrappers in
`format-inl.h` that wrap Windows's `_(un)lock_file` methods are
defined with a trailing return type derived by using decltype on a
hypothetical call to the underlying functions.
The wrappers don't contain a `return` in their bodies, however, so if
the return type of the underlying functions were to ever change from
`void`, there would be a compile error.
IIRC, the ability to write
`return [other function returning void]();` in a function returning
void is a new-ish addition to the standard (no idea when). Since these
functions aren't public-facing, and no library code ever attempts to
use their return values, I opted to just declare them `void` instead
of adding `return`s.f(un)lockfile wrappers for Windows1 parent 9396f77 commit 2abaa8a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1476 | 1476 | | |
1477 | 1477 | | |
1478 | 1478 | | |
1479 | | - | |
| 1479 | + | |
1480 | 1480 | | |
1481 | 1481 | | |
1482 | | - | |
| 1482 | + | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | 1485 | | |
| |||
0 commit comments