Fix TLS initialization condition.
This commit is contained in:
parent
9e390de9bf
commit
719c62d6c9
|
@ -228,7 +228,7 @@ struct TaskLocal(T)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_hasInitValue) {
|
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); } ();
|
() @trusted { emplace!T(data, m_initValue); } ();
|
||||||
else assert(false, "Cannot emplace initialization value for type "~T.stringof);
|
else assert(false, "Cannot emplace initialization value for type "~T.stringof);
|
||||||
} else () @trusted { emplace!T(data); } ();
|
} else () @trusted { emplace!T(data); } ();
|
||||||
|
|
Loading…
Reference in a new issue