Skip to content

Commit

Permalink
add move assigenment for Typed_Mem
Browse files Browse the repository at this point in the history
  • Loading branch information
ESResearchDepartment committed Jan 23, 2024
1 parent 45e6f58 commit 62df839
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/libgeneral/Mem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Typed_Mem {
public:
Typed_Mem() :_mem(sizeof(T)){}
Typed_Mem(const void *data, size_t size):_mem(data,size){}
Typed_Mem(Mem &&old) noexcept :_mem(old){} //move assignment
inline __attribute__((always_inline)) operator const T*() const {return (const T*)_mem.data();}
inline __attribute__((always_inline)) operator T*() {return (T*)_mem.data();}

Expand Down

0 comments on commit 62df839

Please sign in to comment.