Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

request_value_semantics test failed#238

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 4 commits intocpp-netlib:masterfromnico159:master
May 23, 2013
Merged

request_value_semantics test failed#238

deanberris merged 4 commits intocpp-netlib:masterfromnico159:master
May 23, 2013

Conversation

nico159
Copy link

[ RUN ] message_test.request_value_semantics
/home/nico159/cpp-netlib/http/test/request_test.cpp:42: Failure
Value of: copy != assigned
Actual: false
Expected: true
[ FAILED ] message_test.request_value_semantics (28 ms)

The current implementation in request of swap and equals is:

// Then we lift the swap and equals implementation.using request_base::swap;using request_base::equals;

But it's not good, as they don't care about request_pimpl in http::request
So I defined swap and equals for request (and also added an unit test for swap)

I'm a bit unsure if this it the correct way to fix the unit test

@@ -161,6 +161,15 @@ request& request::operator=(request rhs) {
return *this;
}

void request::swap(request& other ) {
std::swap(pimpl_, other.pimpl_);
request_storage_base::swap(other);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Almost, but not quite. It should probably look like this:

using std::swap;swap(pimpl_, other.pimpl_);request_storage_base::swap(other);

@deanberris
Copy link
Member

Just address the above comment, and it should be good to go -- good job! 👍

@nico159
Copy link
Author

Ok, done

@deanberris
Copy link
Member

LGTM

deanberris added a commit that referenced this pull requestMay 23, 2013
request_value_semantics test failed
@deanberrisdeanberris merged commit185da8a intocpp-netlib:masterMay 23, 2013
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@nico159@deanberris

[8]ページ先頭

©2009-2025 Movatter.jp