[+] Added AU_SHARED_FROM_THIS -> returns a shared pointer of decltype(*this) when std::enable_shared_from_this is present in a subclass
This commit is contained in:
parent
613a4b1455
commit
a1df310ddc
@ -6,10 +6,13 @@
|
||||
Author: Reece
|
||||
***/
|
||||
#pragma once
|
||||
|
||||
#define AU_NO_COPY(type) type(type&) = delete;
|
||||
#define AU_NO_MOVE(type) type(type&&) = delete;
|
||||
#define AU_NO_COPY_NO_MOVE(type) AU_NO_COPY(type) AU_NO_MOVE(type)
|
||||
|
||||
#define AU_SHARED_FROM_THIS (std::static_pointer_cast<std::remove_pointer_t<decltype(this)>>(this->shared_from_this()))
|
||||
|
||||
#define AU_STRINGIFY_(in) #in
|
||||
#define AU_STRINGIFY(in) AU_STRINGIFY_(in)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user