mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
UpcastablePointer: introduce copy helper
This commit is contained in:
committed by
Alessandro Di Federico
parent
efc24dee4b
commit
2dfdff992d
@@ -174,6 +174,10 @@ public:
|
||||
return UpcastablePointer<T>(new Q(std::forward<Args>(TheArgs)...));
|
||||
}
|
||||
|
||||
UpcastablePointer copy() const {
|
||||
return UpcastablePointer(clone(Pointer.get()));
|
||||
}
|
||||
|
||||
public:
|
||||
UpcastablePointer &operator=(const UpcastablePointer &Other) {
|
||||
if (&Other != this) {
|
||||
|
||||
Reference in New Issue
Block a user