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

Example http_server_async.cpp size() on moved away object? #992

Closed
SimonEbner opened this issue Jan 20, 2018 · 1 comment
Closed

Example http_server_async.cpp size() on moved away object? #992

SimonEbner opened this issue Jan 20, 2018 · 1 comment
Labels

Comments

@SimonEbner
Copy link
Contributor

I was going through the examples and wondering if the line 197 in the example http_server_async.cpp is correct

res.content_length(body.size());

since it is calling size() on the object that has been moved in line 193?

std::make_tuple(std::move(body)),

Or if it's working correctly if it's not brittle to say the least?

@vinniefalco
Copy link
Member

How the heck does that even work? Yeah it looks off...

vinniefalco added a commit to vinniefalco/beast that referenced this issue Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants