src: introduce raw_index_bytes()
This commit is contained in:
@@ -196,6 +196,12 @@ template <class T>
|
||||
inline typename Ptr<T>::pointer raw_bytes(const Ptr<T> &a, size_t size_in_bytes) {
|
||||
return a.raw_bytes(size_in_bytes);
|
||||
}
|
||||
template <class T>
|
||||
inline typename Ptr<T>::pointer raw_index_bytes(const Ptr<T> &a, size_t index,
|
||||
size_t size_in_bytes) {
|
||||
typedef typename Ptr<T>::element_type element_type;
|
||||
return raw_bytes(a, mem_size(sizeof(element_type), index, size_in_bytes)) + index;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user