diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-19 22:13:16 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-19 22:13:16 +0200 |
commit | b102ae6d6ea778f28d4213b5b886dcb51a9b0fd9 (patch) | |
tree | 0d3d10c91b501e6db7b3f35c73989d11952c4c11 /c/common.h | |
parent | 7691269b7b9ddf6fbed53048b9a5ae85d58fd4be (diff) | |
download | EpisodeBrowser-b102ae6d6ea778f28d4213b5b886dcb51a9b0fd9.tar.gz |
Use std::declval.
This is equivalent, but it may be useful to highlight that `args' does
not HAVE to be declared in order to get the return type of the
function call.
Diffstat (limited to 'c/common.h')
-rw-r--r-- | c/common.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -66,7 +66,7 @@ inline auto throw_nil(T... args) template <auto f, class... T> inline auto warn_nil(T... args) { - decltype(f(args...)) r; + decltype(f(std::declval<T>()...)) r; try { r = throw_nil<f>(args...); } catch (Win32Error& e) { |