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

Compiling for iOS using Xcode 9 tool chain has lambda capture 'this' is not used error #773

Closed
mobileben opened this issue Jun 4, 2018 · 3 comments

Comments

@mobileben
Copy link
Contributor

In http_client_asio.cpp I am getting this error:

error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
auto start_http_request_flow = [proxy_type, proxy_host, proxy_port AND_CAPTURE_MEMBER_FUNCTION_POINTERS](std::shared_ptr<asio_context> ctx)

Clang compiler also sets GNUC, so inevitably this get set

#define AND_CAPTURE_MEMBER_FUNCTION_POINTERS , this

Currently I am doing this

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || (__clang__ && __APPLE__)

As a work around. If this seems reasonable or if I should just drop the && __APPLE__, let me know.

I am currently updating the build process for iOS, so I plan on putting this change in that pull request.

@garethsb
Copy link
Contributor

garethsb commented Jun 4, 2018

See PR #732 (probable simple fix you could check) and issue #768 (workaround).

@ras0219-msft please would you review that PR #732?

@mobileben
Copy link
Contributor Author

@garethsb-sony @ras0219-msft

Hmm, didn't see that one. More or less same approach to fix, just different locations and I added APPLE which was probably not needed, but didn't want to step on anyone's toes.

I probably won't submit my PR for iOS today, since I'm declaring bankruptcy on my older PR for it and am re-doing it (small changes so no biggie). Hopefully #732 will get approved....

@aksswami
Copy link

@ras0219-msft Can we get this one merged?

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

No branches or pull requests

4 participants