We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
runOnNewStack
1 parent d0c973a commit 429a84fCopy full SHA for 429a84f
llvm/include/llvm/Support/ProgramStack.h
@@ -45,7 +45,8 @@ unsigned getDefaultStackSize();
45
void runOnNewStack(unsigned StackSize, function_ref<void()> Fn);
46
47
template <typename R, typename... Ts>
48
-R runOnNewStack(unsigned StackSize, function_ref<R(Ts...)> Fn, Ts &&...Args) {
+std::enable_if_t<!std::is_same_v<R, void>, R>
49
+runOnNewStack(unsigned StackSize, function_ref<R(Ts...)> Fn, Ts &&...Args) {
50
std::optional<R> Ret;
51
runOnNewStack(StackSize, [&]() { Ret = Fn(std::forward<Ts>(Args)...); });
52
return std::move(*Ret);
0 commit comments