X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fowned.h;h=b305ae21d1aea7f371ab5b9a661f00f09153841b;hb=33aed7ee82844023346f8cb9c3108cb0d6c80369;hp=620c6aab54e2114a7e3c718256fb794a92593d47;hpb=6a5d5f8f7bab46c2567752f7bbabca075b926ce3;p=libs%2Fgame.git diff --git a/source/game/owned.h b/source/game/owned.h index 620c6aa..b305ae2 100644 --- a/source/game/owned.h +++ b/source/game/owned.h @@ -21,6 +21,10 @@ public: Owned(Handle

, Args &&...); template + Owned(Owned

&p, Args &&... a): Owned(static_cast &>(p), std::forward(a)...) { } + + template + requires(!std::is_const_v

) Owned(P &parent, Args &&... args): Owned(Handle

::from_object(&parent), std::forward(args)...) { } Owned(Owned &&other): Handle(other) { other.ptr = nullptr; }