Add C++ concept for PAL
This will not be used unless the C++ standard version is raised to 20. As concepts and C++20 more generally are quite new, this does not do so. Nevertheless, the use of concepts can improve the local development experience as type mismatches are discovered earlier (at template invocation rather than only during expansion).
This commit is contained in:
committed by
Matthew Parkinson
parent
a3d54779c8
commit
3e21ea1f65
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "../ds/flaglock.h"
|
||||
#include "../ds/mpmcstack.h"
|
||||
#include "../pal/pal_concept.h"
|
||||
#include "pooled.h"
|
||||
|
||||
namespace snmalloc
|
||||
@@ -21,7 +22,7 @@ namespace snmalloc
|
||||
{
|
||||
private:
|
||||
friend Pooled<T>;
|
||||
template<typename TT>
|
||||
template<SNMALLOC_CONCEPT(ConceptPAL) PAL>
|
||||
friend class MemoryProviderStateMixin;
|
||||
|
||||
std::atomic_flag lock = ATOMIC_FLAG_INIT;
|
||||
|
||||
Reference in New Issue
Block a user