Allow get_rcp() to be called on a const reference
This commit is contained in:
1 parent
0de327d442
commit
7d5316bd79
2 files changed
+13
-2
No files matched your search
+2
-2
@@ -297,9 +297,9 @@ rcp<T> rcp_dynamic_cast(rcp<U> && other)
|
||||
|
||||
#define rcp_managed(classname) \
|
||||
public: \
|
||||
rcp<classname> get_rcp() \
|
||||
rcp<classname> get_rcp() const \
|
||||
{ \
|
||||
return rcp<classname>(this); \
|
||||
return rcp<classname>(const_cast<classname *>(this)); \
|
||||
} \
|
||||
template <typename... Args> \
|
||||
static rcp<classname> create(Args&&... args) \
|
||||
|
||||
Reference in new issue
Block a user