RFC: Hide CapPtr constructor

Expose a static CapPtr<T,B>::unsafe_from() and use that everywhere instead
(though continue to allow implicit and explicit construction of CapPtr from
nullptr).
This commit is contained in:
Nathaniel Wesley Filardo
2022-06-06 17:40:25 +01:00
committed by Nathaniel Filardo
parent 41128a3387
commit f41bb321f7
16 changed files with 74 additions and 47 deletions

View File

@@ -108,8 +108,8 @@ namespace snmalloc
return CapPtr<
T,
typename B::template with_wildness<capptr::dimension::Wildness::Tame>>(
p.unsafe_ptr());
typename B::template with_wildness<capptr::dimension::Wildness::Tame>>::
unsafe_from(p.unsafe_ptr());
}
};