Re: Is variable void?

2017-11-26 Thread codephantom via Digitalmars-d-learn
On Saturday, 25 November 2017 at 15:34:21 UTC, John Chapman wrote: Is there any way of determining whether a variable has been initialized or not? For example, if something is declared like this: int x = void; can I check if it's void before I use it, say, in a function it's been passed

Re: Is variable void?

2017-11-26 Thread crimaniak via Digitalmars-d-learn
On Saturday, 25 November 2017 at 15:34:21 UTC, John Chapman wrote: Is there any way of determining whether a variable has been initialized or not? For example, if something is declared like this: int x = void; can I check if it's void before I use it, say, in a function it's been passed

Re: inout after function

2017-11-26 Thread Guillaume Piolat via Digitalmars-d-learn
On Saturday, 25 November 2017 at 21:51:41 UTC, Dave Jones wrote: What does the "inout" after front() do here... @property ref inout(T) front() inout { assert(_data.refCountedStore.isInitialized); return _data._payload[0]; } Cant seem to find an explanation in the docs or forums :(

Re: inout after function

2017-11-26 Thread Dave Jones via Digitalmars-d-learn
On Sunday, 26 November 2017 at 04:51:08 UTC, Adam D. Ruppe wrote: On Sunday, 26 November 2017 at 01:35:01 UTC, Dave Jones wrote: So it makes it a const/immutable/mutable method depending on whether the instance it is called on is const/immutable/mutable? On the outside, yes. So

Re: Linking multiple libraries

2017-11-26 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-11-25 23:31, Mike Parker wrote: You don't link static libraries with each other. They're just collections of object files intended to be linked with an executable or a DLL. Order doesn't matter for optlink or the MS linker, but other linkers, such as ld (which is commonly used with