Skip to content

Remove user-declared default, copy and move constructors #548

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

Merged
merged 1 commit into from
Aug 7, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove user-declared constructors for response class
Removed the following defaulted constructors:

* Default Constructor
* Copy Constructor
* Move Constructor

The defaulted move constructor prevents implicit declaration of
the copy assignment operator, which results in compiler errors
since std::promise requires it.

All 3 user-declared methods removed here are implicitly declared by
the compiler anyway, so no need to default them in the first place.

Relates to #547
  • Loading branch information
rcdailey committed Aug 6, 2015
commit dd693007fe284cc61dfd2cfe02fbc1e1affa25fe
17 changes: 0 additions & 17 deletions http/src/network/http/v2/client/response.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,6 @@ class response {
*/
typedef headers_type::const_iterator const_headers_iterator;

/**
* \brief Constructor.
*/
response() = default;

/**
* \brief Copy constructor.
* \param other The other response object.
*/
response(const response &other) = default;

/**
* \brief Move constructor.
* \param other The other response object.
*/
response(response &&other) noexcept = default;

/**
* \brief Swap function.
* \param other The other response object.
Expand Down