Search code examples
c++c++14boost-spiritboost-spirit-x3

Parse 64bit hex numbers


I am using spirit X-3 and want to parse RAM addresses that are represented in hex, like "00ff0af0". For 64 bit systems the addresses would have a size of 64 bit.

Unfortunately boost::spirit::x3::hex uses unsigned.

What can I do to parse 64 bit hex numbers with boost-spirit?


Solution

  • You could try to see if this works:

    uint_parser<boost::ulong_long_type, 16, 1, 16> hex_p;