You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What about adding a field m_hasInitValue that will be set to true only if the appropriate constructor is called, and use that to determine which version of emplace to use?
Just out of interest, why does this case issues for you? Is emplace erroneously trying to call a constructor instead of directly initializing with m_initValue?
Long story short I need to prevent TaskLocal from emplacing with its default (given) value.
My solution is basically:
And in storage method:
https://github.com/rejectedsoftware/vibe.d/blob/master/source/vibe/core/core.d#L857
I'm sure there is a better way to do this.
The text was updated successfully, but these errors were encountered: