Use backend global concept on template args

Wire the concept into the rest of the tree, being careful to avoid demanding the
result of fixed-pointing computation while tying the knot.
This commit is contained in:
Nathaniel Wesley Filardo
2021-08-23 21:26:56 +01:00
committed by Nathaniel Wesley Filardo
parent e530f5629a
commit 2be44d2e6f
6 changed files with 22 additions and 17 deletions

View File

@@ -23,7 +23,7 @@ namespace snmalloc
{
template<
typename TT,
typename SharedStateHandle,
SNMALLOC_CONCEPT(ConceptBackendGlobals) SharedStateHandle,
PoolState<TT>& get_state()>
friend class Pool;
@@ -42,7 +42,9 @@ namespace snmalloc
* SingletonPoolState::pool is the default provider for the PoolState within
* the Pool class.
*/
template<typename T, typename SharedStateHandle>
template<
typename T,
SNMALLOC_CONCEPT(ConceptBackendGlobals) SharedStateHandle>
class SingletonPoolState
{
/**
@@ -113,7 +115,7 @@ namespace snmalloc
*/
template<
typename T,
typename SharedStateHandle,
SNMALLOC_CONCEPT(ConceptBackendGlobals) SharedStateHandle,
PoolState<T>& get_state() = SingletonPoolState<T, SharedStateHandle>::pool>
class Pool
{