KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I was looking at the request parser from the boost::asio example and I was wondering why the private member functions like is_char() are static ? : class request_parser { ... private: static bool is_char(int c); ... }; It is used in the function consume which is not a static function: boost::tribool request_parser::consume(request& req, char input) { switch (state_) { case method_start: if (!is_char(input) || is_ctl(input) || is_tspecial(input)) { return false; } ... Only member functions can call is_char() and no static member function is calling is_char() . So is there a reason why these functions are static?
Tags (comma-separated)
Save Edits
Cancel