Refactor capptr_domesticate SFINAE to make more statically safe.
This refactoring was provided by David. Previously if a backend provided a capptr_domesticate function with the wrong type it would be silently ignored. This change requires backends to explicitly opt in to domestication via a new Backend::Option and ensures the compiler will loudly complain if there is a mismatch.
This commit is contained in:
committed by
David Chisnall
parent
bf54eeb7be
commit
f277cf2f00
@@ -40,6 +40,7 @@ namespace snmalloc
|
||||
{
|
||||
Flags opts = {};
|
||||
opts.QueueHeadsAreTame = false;
|
||||
opts.HasDomesticate = true;
|
||||
return opts;
|
||||
}
|
||||
();
|
||||
|
||||
Reference in New Issue
Block a user