Krzysztof Sakrejda
2018-03-01 21:50:48 UTC
I'm looking for a suggestion about where to look next for fixing this
issue. With these three lines I get a compilation failure:
capnp::JsonCodec json;
capnp::SegmentArrayMessageReader reader(builder.getSegmentsForOutput());
kj::String json_encoded = json.encode(reader);
The failure is on the third line, I'm failing to see if I did something
wrong or if there are caveats to the JSON
encode function that I'm missing. These are schema I can already write out
to a binary stream successfully and
read back so I think those are ok.
Here's the compiler message:
[ 83%] Building CXX object src/capnstan/CMakeFiles/config_writer.dir/
config_writer.cpp.o
In file included from /home/krzysztof/packages/capnStan/downloads/capnproto-
c++/src/capnp/raw-schema.h:29:0,
from /home/krzysztof/packages/capnStan/capnStan/../
downloads/capnproto-c++/src/capnp/generated-header-support.h:31,
from /home/krzysztof/packages/capnStan/capnStan/src/capnp/
stan-config.capnp.h:7,
from /home/krzysztof/packages/capnStan/capnStan/src/
capnstan/config_switch.hpp:34,
from /home/krzysztof/packages/capnStan/capnStan/src/
capnstan/config_writer.cpp:1:
/home/krzysztof/packages/capnStan/downloads/capnproto-c++/src/capnp/common.h
: In substitution of âtemplate<class T> using FromAny = typename capnp::
FromAny_<T>::Type [with T = kj::Decay_<capnp::SegmentArrayMessageReader&>::
Type]â:
/home/krzysztof/packages/capnStan/capnStan/../downloads/capnproto-c++/src/
capnp/compat/json.h:215:33: required from âkj::String capnp::JsonCodec::
encode(T&&) [with T = capnp::SegmentArrayMessageReader&]â
/home/krzysztof/packages/capnStan/capnStan/src/capnstan/config_writer.cpp:26
:51: required from here
/home/krzysztof/packages/capnStan/downloads/capnproto-c++/src/capnp/common.h
:290:43: error: invalid use of incomplete type âstruct capnp::FromAny_<capnp
::SegmentArrayMessageReader, void>â
using FromAny = typename FromAny_<T>::Type;
^
/home/krzysztof/packages/capnStan/downloads/capnproto-c++/src/capnp/common.h
:256:8: note: declaration of âstruct capnp::FromAny_<capnp::
SegmentArrayMessageReader, void>â
struct FromAny_;
^~~~~~~~
issue. With these three lines I get a compilation failure:
capnp::JsonCodec json;
capnp::SegmentArrayMessageReader reader(builder.getSegmentsForOutput());
kj::String json_encoded = json.encode(reader);
The failure is on the third line, I'm failing to see if I did something
wrong or if there are caveats to the JSON
encode function that I'm missing. These are schema I can already write out
to a binary stream successfully and
read back so I think those are ok.
Here's the compiler message:
[ 83%] Building CXX object src/capnstan/CMakeFiles/config_writer.dir/
config_writer.cpp.o
In file included from /home/krzysztof/packages/capnStan/downloads/capnproto-
c++/src/capnp/raw-schema.h:29:0,
from /home/krzysztof/packages/capnStan/capnStan/../
downloads/capnproto-c++/src/capnp/generated-header-support.h:31,
from /home/krzysztof/packages/capnStan/capnStan/src/capnp/
stan-config.capnp.h:7,
from /home/krzysztof/packages/capnStan/capnStan/src/
capnstan/config_switch.hpp:34,
from /home/krzysztof/packages/capnStan/capnStan/src/
capnstan/config_writer.cpp:1:
/home/krzysztof/packages/capnStan/downloads/capnproto-c++/src/capnp/common.h
: In substitution of âtemplate<class T> using FromAny = typename capnp::
FromAny_<T>::Type [with T = kj::Decay_<capnp::SegmentArrayMessageReader&>::
Type]â:
/home/krzysztof/packages/capnStan/capnStan/../downloads/capnproto-c++/src/
capnp/compat/json.h:215:33: required from âkj::String capnp::JsonCodec::
encode(T&&) [with T = capnp::SegmentArrayMessageReader&]â
/home/krzysztof/packages/capnStan/capnStan/src/capnstan/config_writer.cpp:26
:51: required from here
/home/krzysztof/packages/capnStan/downloads/capnproto-c++/src/capnp/common.h
:290:43: error: invalid use of incomplete type âstruct capnp::FromAny_<capnp
::SegmentArrayMessageReader, void>â
using FromAny = typename FromAny_<T>::Type;
^
/home/krzysztof/packages/capnStan/downloads/capnproto-c++/src/capnp/common.h
:256:8: note: declaration of âstruct capnp::FromAny_<capnp::
SegmentArrayMessageReader, void>â
struct FromAny_;
^~~~~~~~
--
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 capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
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 capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.