Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing move constructor for connector template #60

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

mcopik
Copy link
Contributor

@mcopik mcopik commented Dec 6, 2021

The main template class of tcp_connector is missing a move constructor - it is in the base class, but not in the derived class.

This makes it impossible to use connections with std::vector, as it requires a move or a copy constructor.

#include <vector>

#include <sockpp/tcp_connector.h>

void foo()
{
  sockpp::tcp_connector conn;
  std::vector<sockpp::tcp_connector> connections;
  connections.push_back(std::move(conn));
}

@fpagliughi
Copy link
Owner

Oh, of course. Thanks!

@fpagliughi fpagliughi merged commit f7ebd3a into fpagliughi:master Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants