I need to write a function to convert tuple to byte array. The type of tuple may include int, long, double, std::string, char*,etc. The size and type of tuple a
int, long, double, std::string, char*
There is also the brilliant C++ API for message pack which supports tuples natively
#include #include #include #include int main() { auto t = std::make_tuple("1", 1, 1.0); auto buffer = std::stringstream{}; // easy peezy msgpack::pack(buffer, t); auto tuple_as_string = buffer.str(); }