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:
Robert Norton
2022-04-27 11:56:16 +01:00
committed by David Chisnall
parent bf54eeb7be
commit f277cf2f00
4 changed files with 72 additions and 19 deletions

View File

@@ -40,6 +40,7 @@ namespace snmalloc
{
Flags opts = {};
opts.QueueHeadsAreTame = false;
opts.HasDomesticate = true;
return opts;
}
();