Skip to content

Commit

Permalink
refactor: only define constructors for Client types (#418)
Browse files Browse the repository at this point in the history
The `Client` types that follow pimpl idiom had warnings that they needed
to define destructors as well to satisfy the rule of five.

We don't need to define move/copy/copy-assign/move-assign for these at
all, instead we can follow the rule of zero since the only member is a
`std::unique_ptr`.
  • Loading branch information
cwaldren-ld authored Jun 20, 2024
1 parent 811cece commit f719d78
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions libs/client-sdk/include/launchdarkly/client_side/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,6 @@ class Client : public IClient {
public:
Client(Config config, Context context);

Client(Client&&) = delete;
Client(Client const&) = delete;
Client& operator=(Client) = delete;
Client& operator=(Client&& other) = delete;

std::future<bool> StartAsync() override;

[[nodiscard]] bool Initialized() const override;
Expand Down
5 changes: 0 additions & 5 deletions libs/server-sdk/include/launchdarkly/server_side/client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,6 @@ class Client : public IClient {
public:
Client(Config config);

Client(Client&&) = delete;
Client(Client const&) = delete;
Client& operator=(Client) = delete;
Client& operator=(Client&& other) = delete;

std::future<bool> StartAsync() override;

[[nodiscard]] bool Initialized() const override;
Expand Down

0 comments on commit f719d78

Please sign in to comment.