Skip to content

Commit

Permalink
chore: reset copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Aug 27, 2024
1 parent 60c70c5 commit 863b5c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ll/api/memory/IndirectValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ class IndirectValue {

constexpr T* release() noexcept { return unique().release(); }

constexpr void reset(T* ptr = nullptr) noexcept { return unique().reset(ptr); }
constexpr void reset(T* ptr = nullptr, CopyCtor const& copy = CopyCtor{}) noexcept {
getCopyCtor() = copy;
return unique().reset(ptr);
}

constexpr explicit operator bool() const noexcept { return get(); }

Expand Down

0 comments on commit 863b5c4

Please sign in to comment.