Skip to content

Commit

Permalink
added move and copy ctors and assignment operators
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas committed Oct 22, 2021
1 parent d60e8e6 commit 719c691
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/unionfind/unionfind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ class UnionFind
0);
}

UnionFind() = delete;
UnionFind(UnionFind&&) noexcept = default;
UnionFind(const UnionFind&) noexcept = default;
auto operator=(UnionFind&&) noexcept -> UnionFind& = default;
auto operator=(const UnionFind&) noexcept -> UnionFind& = default;

[[nodiscard]] auto find(std::size_t x) noexcept
-> std::optional<std::size_t>
{
Expand Down

0 comments on commit 719c691

Please sign in to comment.