From 897c43051fcb8af8febf74fdeaf0c4e964ec2955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Thu, 23 Feb 2017 15:49:59 +0100 Subject: [PATCH] Fix nothrow inference for runTask. --- source/vibe/core/core.d | 2 +- source/vibe/core/task.d | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/vibe/core/core.d b/source/vibe/core/core.d index 2e706fd..62a0890 100644 --- a/source/vibe/core/core.d +++ b/source/vibe/core/core.d @@ -341,7 +341,7 @@ auto runTaskScoped(FT, ARGS)(scope FT callable, ARGS args) } package Task runTask_internal(alias TFI_SETUP)() -@safe nothrow { +{ import std.typecons : Tuple, tuple; TaskFiber f; diff --git a/source/vibe/core/task.d b/source/vibe/core/task.d index 33dcc57..f394456 100644 --- a/source/vibe/core/task.d +++ b/source/vibe/core/task.d @@ -554,14 +554,14 @@ package struct TaskFuncInfo { } void initCallable(C)() - { - C cinit; + nothrow { + static const C cinit; this.callable[0 .. C.sizeof] = cast(void[])(&cinit)[0 .. 1]; } void initArgs(A)() - { - A ainit; + nothrow { + static const A ainit; this.args[0 .. A.sizeof] = cast(void[])(&ainit)[0 .. 1]; } }