Skip to content

Commit 1c165b0

Browse files
committed
use decltype(auto) so the return type matches the return type passed in.
1 parent 01eafbe commit 1c165b0

File tree

1 file changed

+1
-1
lines changed
  • system/include/emscripten

1 file changed

+1
-1
lines changed

system/include/emscripten/val.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ class EMBIND_VISIBILITY_DEFAULT val {
580580
using Policy = WithPolicies<FilterTypes<isPolicy, Args...>>;
581581
auto filteredArgs = Filter<isNotPolicy>(args...);
582582
return std::apply(
583-
[&](auto&&... filteredArgs) {
583+
[&](auto&&... filteredArgs) -> decltype(auto) {
584584
return internalCallWithPolicy<Kind, Policy, Ret>(handle, methodName, std::forward<decltype(filteredArgs)>(filteredArgs)...);
585585
},
586586
filteredArgs

0 commit comments

Comments
 (0)