diff options
author | Mateusz Chudyk <mateuszchudyk@gmail.com> | 2019-06-21 14:11:01 +0300 |
---|---|---|
committer | Mateusz Chudyk <mateuszchudyk@gmail.com> | 2019-06-21 14:48:49 +0300 |
commit | 9ac27d7de2965fb8129bfc00f27319acfb20cd5a (patch) | |
tree | 41bee09172191e6443f559af88e6eaa78f23c68a /aligned.h | |
parent | 1af38c949cefccdb998ea4d79c546eefc89a9f3f (diff) |
Use AlignedVector in tests
Diffstat (limited to 'aligned.h')
-rw-r--r-- | aligned.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -22,6 +22,9 @@ template <class T> class AlignedVector { T *end() { return mem_ + size_; } const T *end() const { return mem_ + size_; } + template <typename ReturnType> + ReturnType *as() { return reinterpret_cast<ReturnType*>(mem_); } + private: T *mem_; std::size_t size_; |