boost tribool parser parse_first_line std string line_end std string c

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
boost::tribool parser::parse_first_line()
{
std::string line_end = "\r\n";
std::string::const_iterator first_line_end =
std::search(current_pos_, buffer_.end(),
line_end.begin(), line_end.end());
if(first_line_end == buffer_.end())
return boost::indeterminate;
std::copy(current_pos_, first_line_end,
std::back_inserter(package_.start_line_));
return true;
}