Hi,

I try to write a binding for the GRPC core. There is a struct which has some ugly fields:
(https://github.com/grpc/grpc/blob/master/src/core/lib/surface/call.cc#L229)

struct grpc_call {
  gpr_refcount ext_ref;
  gpr_arena* arena;
  ...
grpc_core::ManualConstructor<grpc_core::SliceBufferByteStream> sending_stream; grpc_core::OrphanablePtr<grpc_core::ByteStream> receiving_stream;


ManualConstructor is defined as:
https://github.com/grpc/grpc/blob/50cecca24d4826dea4595b514a332fca5783074b/src/core/lib/gprpp/manual_constructor.h#L168

template <typename Type>
class ManualConstructor {
 public:
  Type* get() { return reinterpret_cast<Type*>(&space_); }
const Type* get() const { return reinterpret_cast<const Type*>(&space_); }


My C / C++ knowledge is very limited and I also do not know how much D matured regarding C / C++ integration. Is it possible to write a binding in D for these constructs or isn't it supported by D?

Kind regards
André


Reply via email to