Add workaround for MSVC vs. CapPtr constructor

This commit is contained in:
Nathaniel Filardo
2021-04-07 16:58:28 +01:00
committed by Nathaniel Wesley Filardo
parent d9ee19a16c
commit e31751fc94
2 changed files with 18 additions and 0 deletions

View File

@@ -19,6 +19,8 @@ namespace
/**
* Helper for Alloc that is never used as a thread-local allocator and so is
* always initialised.
*
* CapPtr-vs-MSVC triggering; xref CapPtr's constructor
*/
bool never_init(void*)
{
@@ -26,6 +28,8 @@ namespace
}
/**
* Helper for Alloc that never needs lazy initialisation.
*
* CapPtr-vs-MSVC triggering; xref CapPtr's constructor
*/
void* no_op_init(function_ref<void*(void*)>)
{