MCPcopy Create free account
hub / github.com/boostorg/stacktrace / hex_str_to_int

Function hex_str_to_int

include/boost/stacktrace/detail/addr_base.hpp:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33inline uintptr_t hex_str_to_int(const std::string& str) {
34 uintptr_t out;
35 std::stringstream ss;
36 ss << std::hex << str;
37 ss >> out;
38 if(ss.eof() && !ss.fail()) { // whole stream read, with no errors
39 return out;
40 } else {
41 throw std::invalid_argument(std::string("can't convert '") + str + "' to hex");
42 }
43}
44
45// parse line from /proc/<id>/maps
46// format:

Callers 1

parse_proc_maps_lineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected