here is the error in the compilation
26:22: error: no member named 'set' in 'capnp::List<ServiceDescription,
capnp::Kind::STRUCT>::Builder'
list.set(i++, it->second);
On Saturday, January 19, 2019 at 11:32:45 AM UTC-5,
[email protected] wrote:
>
> Hi,
>
> I have just started looking the C++ package and I am blocked on something
> that should be easy. What I found in this group or in some examples can't
> seem to fix my issue.
> I am with C++ 17 / Capnp 0.7.0 on Mac
>
> My example is a simple interface:
>
> interface MyService {
>
> services @0 () -> (list: List(ServiceDescription));
> }
>
> When I implement it I try to set the list to like so:
>
> kj::Promise<void> aggregators(AggregatorsContext context) override {
> auto list = context.getResults().initList(serviceMap.size()) ;
> int i=0;
> for (std::map<int,ServiceDescription>::iterator it=serviceMap.begin();
> it!=serviceMap.end(); ++it)
> list.set(i++, it->second);
> context.getResults().setList(list);
> return kj::READY_NOW;
> }
>
>
>
> But I am getting a compilation error saying that the set member does not
> exist yet even though it is there in the API...
>
>
> I must be doing something too plainly wrong to see ...
>
>
> thanks for any pointer
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.