Re: Pointer to private structure

2016-12-19 Thread Nikhil Jacob via Digitalmars-d-learn
On Monday, 19 December 2016 at 10:14:49 UTC, Ali wrote: On Monday, 19 December 2016 at 06:42:27 UTC, Nikhil Jacob wrote: [...] What're you trying to do here? Forward declarations in C++ are used to solve a few different things: 1. Reduce build times (unneeded in D AFAIK) 2. Break cyclic ref

Re: Pointer to private structure

2016-12-19 Thread Ali via Digitalmars-d-learn
On Monday, 19 December 2016 at 06:42:27 UTC, Nikhil Jacob wrote: On Monday, 19 December 2016 at 06:21:10 UTC, ketmar wrote: i bet that just trying this with D compiler will take less time than writing forum post. I did try but it seems to give compilation failure... Let me try once more and I

Re: Pointer to private structure

2016-12-18 Thread Nikhil Jacob via Digitalmars-d-learn
On Monday, 19 December 2016 at 06:21:10 UTC, ketmar wrote: i bet that just trying this with D compiler will take less time than writing forum post. I did try but it seems to give compilation failure... Let me try once more and I will get back with more details.

Re: Pointer to private structure

2016-12-18 Thread ketmar via Digitalmars-d-learn
i bet that just trying this with D compiler will take less time than writing forum post.

Re: Pointer to private structure

2016-12-18 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 19 December 2016 at 05:51:09 UTC, Nikhil Jacob wrote: In C, we can define a struct without body in an include file and use pointer to that structure For examples in public header file. struct data; data* new_data(); We can then define the elements of struct data privately inside