alloc/raw/linear: add offset overload for views

This commit is contained in:
Danny Robson 2018-04-20 15:04:12 +10:00
parent 09b9c1dc8b
commit e7b12e7792

View File

@ -52,6 +52,13 @@ namespace util::alloc::raw {
size_t offset (const void*) const;
template <typename T>
size_t
offset (util::view<T*> ptr) const
{
return offset (ptr.data ());
}
void reset (void);
size_t capacity (void) const;