aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-19 22:13:16 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-19 22:13:16 +0200
commitb102ae6d6ea778f28d4213b5b886dcb51a9b0fd9 (patch)
tree0d3d10c91b501e6db7b3f35c73989d11952c4c11
parent7691269b7b9ddf6fbed53048b9a5ae85d58fd4be (diff)
downloadEpisodeBrowser-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.
-rw-r--r--c/common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/common.h b/c/common.h
index efaa800..7d3f8bd 100644
--- a/c/common.h
+++ b/c/common.h
@@ -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) {