{"action":"created","issue":{"url":"https://api.github.com/repos/vinniefalco/Beast/issues/94","repository_url":"https://api.github.com/repos/vinniefalco/Beast","labels_url":"https://api.github.com/repos/vinniefalco/Beast/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/vinniefalco/Beast/issues/94/comments","events_url":"https://api.github.com/repos/vinniefalco/Beast/issues/94/events","html_url":"https://github.com/vinniefalco/Beast/issues/94","id":179173765,"number":94,"title":"Build error of async_handshake on Android","user":{"login":"sksinishin","id":10097523,"avatar_url":"https://avatars.githubusercontent.com/u/10097523?v=3","gravatar_id":"","url":"https://api.github.com/users/sksinishin","html_url":"https://github.com/sksinishin","followers_url":"https://api.github.com/users/sksinishin/followers","following_url":"https://api.github.com/users/sksinishin/following{/other_user}","gists_url":"https://api.github.com/users/sksinishin/gists{/gist_id}","starred_url":"https://api.github.com/users/sksinishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sksinishin/subscriptions","organizations_url":"https://api.github.com/users/sksinishin/orgs","repos_url":"https://api.github.com/users/sksinishin/repos","events_url":"https://api.github.com/users/sksinishin/events{/privacy}","received_events_url":"https://api.github.com/users/sksinishin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-26T09:00:24Z","updated_at":"2016-09-26T11:50:12Z","closed_at":null,"body":"code:\r\n```\r\ntypedef std::function<void(const boost::system::error_code&)> async_handler;\r\n\r\nvoid connection::async_connect_ws(const std::string& host, int port, async_handler handler) {\r\n_ws_stream.async_handshake(host, \"/\", [this, self, handler](const boost::system::error_code& ec)\r\n {\r\n      if (ec)   {\r\n            LOG_ERR(\"Can't switch to websocket protocol\");\r\n      }\r\n\r\n       if (handler)\r\n           handler(ec);\r\n });\r\n}\r\n```\r\n**Clang + llvm stl (c++_static)**\r\n\r\nErrors:\r\n```\r\nIn file included from src/client/connection.cpp:9:\r\nIn file included from src/client/connection.hpp:12:\r\n/Users/user/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4285:39: error: 'rebind' following the 'template' keyword does not refer to a template\r\n    typedef typename _Alloc::template rebind<_CntrlBlk>::other _A2;\r\n                                      ^~~~~~\r\n/Users/user/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libcxx/include/memory:4642:29: note: in instantiation of function template specialization 'std::__ndk1::shared_ptr<beast::websocket::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> > &>::handshake_op<(lambda at src/client/connection.cpp:133:63)>::data>::allocate_shared<beast::handler_alloc<char, (lambda at client/connection.cpp:133:63)>, (lambda at client/connection.cpp:133:63) &, beast::websocket::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> > &> &, const boost::basic_string_ref<char, std::__ndk1::char_traits<char> > &, const boost::basic_string_ref<char, std::__ndk1::char_traits<char> > &>' requested here\r\n    return shared_ptr<_Tp>::allocate_shared(__a, _VSTD::forward<_Args>(__args)...);\r\n                            ^\r\n3rdparty/include/beast/websocket/impl/handshake_op.ipp:64:19: note: in instantiation of function template specialization 'std::__ndk1::allocate_shared<beast::websocket::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> > &>::handshake_op<(lambda at client/connection.cpp:133:63)>::data, beast::handler_alloc<char, (lambda at client/connection.cpp:133:63)>, (lambda at client/connection.cpp:133:63) &, beast::websocket::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> > &> &, const boost::basic_string_ref<char, std::__ndk1::char_traits<char> > &, const boost::basic_string_ref<char, std::__ndk1::char_traits<char> > &>' requested here\r\n        : d_(std::allocate_shared<data>(alloc_type{h},\r\n                  ^\r\n3rdparty/include/beast/websocket/impl/stream.ipp:389:5: note: in instantiation of function template specialization 'beast::websocket::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> > &>::handshake_op<(lambda at client/connection.cpp:133:63)>::handshake_op<(lambda at client/connection.cpp:133:63) &, const boost::basic_string_ref<char, std::__ndk1::char_traits<char> > &, const boost::basic_string_ref<char, std::__ndk1::char_traits<char> > &>' requested here\r\n    handshake_op<decltype(completion.handler)>{\r\n    ^\r\nsrc/client/connection.cpp:133:36: note: in instantiation of function template specialization 'beast::websocket::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::stream_socket_service<boost::asio::ip::tcp> > &>::async_handshake<(lambda at client/connection.cpp:133:63)>' requested here\r\n                        _ws_stream.async_handshake(host, \"/\", [this, self, handler](const boost::system::error_code& ec)\r\n```\r\n\r\n**clang gnustl_static**\r\n\r\nErrors:\r\n`In file included from src/client/client.cpp:9:\r\nIn file included from src/client/client.hpp:22:\r\nIn file included from src/client/connection.hpp:15:\r\nIn file included from 3rdparty/include/beast/websocket.hpp:14:\r\nIn file included from 3rdparty/include/beast/websocket/stream.hpp:13:\r\nIn file included from 3rdparty/include/beast/http/message_v1.hpp:133:\r\n3rdparty/include/beast/http/impl/message_v1.ipp:144:22: error: no member named 'to_string' in namespace 'std'\r\n                std::to_string(*pi.content_length));\r\n                ~~~~~^`"},"comment":{"url":"https://api.github.com/repos/vinniefalco/Beast/issues/comments/249548880","html_url":"https://github.com/vinniefalco/Beast/issues/94#issuecomment-249548880","issue_url":"https://api.github.com/repos/vinniefalco/Beast/issues/94","id":249548880,"user":{"login":"vinniefalco","id":1503976,"avatar_url":"https://avatars.githubusercontent.com/u/1503976?v=3","gravatar_id":"","url":"https://api.github.com/users/vinniefalco","html_url":"https://github.com/vinniefalco","followers_url":"https://api.github.com/users/vinniefalco/followers","following_url":"https://api.github.com/users/vinniefalco/following{/other_user}","gists_url":"https://api.github.com/users/vinniefalco/gists{/gist_id}","starred_url":"https://api.github.com/users/vinniefalco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinniefalco/subscriptions","organizations_url":"https://api.github.com/users/vinniefalco/orgs","repos_url":"https://api.github.com/users/vinniefalco/repos","events_url":"https://api.github.com/users/vinniefalco/events{/privacy}","received_events_url":"https://api.github.com/users/vinniefalco/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T11:50:12Z","updated_at":"2016-09-26T11:50:12Z","body":"Okay, what about adding the `rebind` alias to `handler_alloc`? Does that fix the first error?"}}
{"actor":{"display_login":"vinniefalco"}}