From 719c62d6c95a43400a4498b5e5654ecb32abfff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sun, 16 Jul 2017 00:08:07 +0200 Subject: [PATCH] Fix TLS initialization condition. --- source/vibe/core/task.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/vibe/core/task.d b/source/vibe/core/task.d index 2a4c397..8733375 100644 --- a/source/vibe/core/task.d +++ b/source/vibe/core/task.d @@ -228,7 +228,7 @@ struct TaskLocal(T) } if (m_hasInitValue) { - static if (__traits(compiles, emplace!T(data, m_initValue))) + static if (__traits(compiles, () @trusted { emplace!T(data, m_initValue); } ())) () @trusted { emplace!T(data, m_initValue); } (); else assert(false, "Cannot emplace initialization value for type "~T.stringof); } else () @trusted { emplace!T(data); } ();