As answered in this question:
Note that an individual List value in a Cap'n Proto structure has a limit of 2^29-1 elements
Due to this limitation for a single list, I'm trying to split one list that contains more than this amount of items into a map of lists. To do it, I'm using the following schema:
struct Map64UInt{
entries @0: List(Entry);
struct Entry{
key @0: UInt64;
value @1: List(UInt64);
}
}
I've been looking into all examples of the Cap'n Proto but I couldn't find one that contains an example on how to create and add itens into a Capn'Proto List, then add this list into a Cap'n Proto Map. As an example, consider the following code:
void addVecToCapnprotoMap(std::vector<uint64_t> &v){
unsigned int key = 0;
//Here: how do I create a Capn' Proto List of uint64_t
//and add it to a Capn Proto map that follows the schema
//described above?
}