{"action":"closed","issue":{"url":"https://api.github.com/repos/eidheim/Simple-Web-Server/issues/78","repository_url":"https://api.github.com/repos/eidheim/Simple-Web-Server","labels_url":"https://api.github.com/repos/eidheim/Simple-Web-Server/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/eidheim/Simple-Web-Server/issues/78/comments","events_url":"https://api.github.com/repos/eidheim/Simple-Web-Server/issues/78/events","html_url":"https://github.com/eidheim/Simple-Web-Server/issues/78","id":185789054,"number":78,"title":"htpp_server.hpp doesn't compile with gcc 4.6.3","user":{"login":"ntadas","id":16400262,"avatar_url":"https://avatars1.githubusercontent.com/u/16400262?v=3","gravatar_id":"","url":"https://api.github.com/users/ntadas","html_url":"https://github.com/ntadas","followers_url":"https://api.github.com/users/ntadas/followers","following_url":"https://api.github.com/users/ntadas/following{/other_user}","gists_url":"https://api.github.com/users/ntadas/gists{/gist_id}","starred_url":"https://api.github.com/users/ntadas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntadas/subscriptions","organizations_url":"https://api.github.com/users/ntadas/orgs","repos_url":"https://api.github.com/users/ntadas/repos","events_url":"https://api.github.com/users/ntadas/events{/privacy}","received_events_url":"https://api.github.com/users/ntadas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-27T21:48:57Z","updated_at":"2017-07-09T07:18:26Z","closed_at":"2017-07-09T07:18:26Z","body":"htpp_server doesn't compile with gcc 4.6.3 (error in the use of class methods inside lambdas).\nto be able to compile with gcc 4.6.3 the following changes are necessary\n\n```\ndiff --git a/server_http.hpp b/server_http.hpp\nindex 05577a2..8f720e5 100644\n--- a/server_http.hpp\n+++ b/server_http.hpp\n@@ -254,7 +254,7 @@ namespace SimpleWeb {\n                     //streambuf (maybe some bytes of the content) is appended to in the async_read-function below (for retrieving content).\n                     size_t num_additional_bytes=request->streambuf.size()-bytes_transferred;\n\n-                    if(!parse_request(request, request->content))\n+                    if(!ServerBase::parse_request(request, request->content))\n                         return;\n\n                     //If content, read that as well\n@@ -263,7 +263,7 @@ namespace SimpleWeb {\n                         //Set timeout on the following boost::asio::async-read or write function\n                         std::shared_ptr<boost::asio::deadline_timer> timer;\n                         if(timeout_content>0)\n-                            timer=set_timeout_on_socket(socket, timeout_content);\n+                            timer=ServerBase::set_timeout_on_socket(socket, timeout_content);\n                         unsigned long long content_length;\n                         try {\n                             content_length=stoull(it->second);\n@@ -281,17 +281,17 @@ namespace SimpleWeb {\n                                 if(timeout_content>0)\n                                     timer->cancel();\n                                 if(!ec)\n-                                    find_resource(socket, request);\n+                                    ServerBase::find_resource(socket, request);\n                             });\n                         }\n                         else {\n                             if(timeout_content>0)\n                                 timer->cancel();\n-                            find_resource(socket, request);\n+                            ServerBase::find_resource(socket, request);\n                         }\n                     }\n                     else {\n-                        find_resource(socket, request);\n+                        ServerBase::find_resource(socket, request);\n                     }\n                 }\n             });\n@@ -368,7 +368,7 @@ namespace SimpleWeb {\n\n             auto response=std::shared_ptr<Response>(new Response(socket), [this, request, timer](Response *response_ptr) {\n                 auto response=std::shared_ptr<Response>(response_ptr);\n-                send(response, [this, response, request, timer](const boost::system::error_code& ec) {\n+                ServerBase::send(response, [this, response, request, timer](const boost::system::error_code& ec) {\n                     if(!ec) {\n                         if(timeout_content>0)\n                             timer->cancel();\n@@ -388,7 +388,7 @@ namespace SimpleWeb {\n                                 return;\n                         }\n                         if(http_version>1.05)\n-                            read_request_and_content(response->socket);\n+                            ServerBase::read_request_and_content(response->socket);\n                     }\n                 });\n             });\n```\n\nthese changes don't do any \"damage\" and are compatible with the latest version of gcc.\nwould it be possible to include them in the class?\n\nthanks\n"}}
{"actor":{"display_login":"eidheim"}}