I am trying to implement serialize and deserialize methods in the following class.
 template <class...T>
    class Collection{
    public:
     //.....
    std::vector<char> serialize();
    std::tuple<T...> deserialize(std::vector<char> & vec);
    private:
    std::tuple<T...> data;
};
T could be any built in type like int, long, string, etc. The return type is a byte stream of all elements int the tuple for serialize method and a tuple from the raw data for the deserialize method.
Thanks.