Skip to content

Commit 7302629

Browse files
f-michautfmichaut-diff
authored andcommitted
Add copy/move support for Endpoint
1 parent 9ffb4b9 commit 7302629

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎include/CppSockets/Address.hpp‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
** Author Francois Michaut
55
**
66
** Started on Sun Feb 13 17:09:05 2022 Francois Michaut
7-
** Last update Wed Aug 20 12:57:17 2025 Francois Michaut
7+
** Last update Wed May 27 13:24:39 2026 Francois Michaut
88
**
99
** Address.hpp : Interface to represent network addresses
1010
*/
@@ -49,7 +49,12 @@ namespace CppSockets {
4949
Endpoint(T addr, std::uint16_t port) :
5050
addr(std::move(addr)), port(port), str(make_string())
5151
{};
52-
~Endpoint() override = default;
52+
Endpoint(const Endpoint &other) = default;
53+
Endpoint(Endpoint &&other) noexcept = default;
54+
~Endpoint() override = default;
55+
56+
auto operator=(const Endpoint &other) -> Endpoint & = default;
57+
auto operator=(Endpoint &&other) noexcept -> Endpoint & = default;
5358

5459
[[nodiscard]] auto get_port() const -> std::uint16_t override { return port; }
5560
[[nodiscard]] auto get_addr() const -> const T & override { return addr; }

0 commit comments

Comments
 (0)