On Sunday, 27 March 2022 at 16:27:44 UTC, JN wrote:
I would like to have only one definition of getX if possible,
because they both are doing the same thing. I can't remove the
ref one, because without a ref it will pass the struct as a
temporary and compiler won't like that.
```d
import
On Sunday, 27 March 2022 at 18:09:30 UTC, Adam D Ruppe wrote:
Normally the IOLBF thing does help there - that means line
buffering - but my recommentation is to explicitly call
`stdout.flush()` any time it is important in your code. Then
you aren't depending on the relatively hidden config
Don't know if this is OT here.
On Sunday, 27 March 2022 at 18:09:30 UTC, Adam D Ruppe wrote:
If the C library thinks it is talking to a pipe, it will switch
to block buffering instead of line buffering. It must just
think msys is a pipe (since it probably is under the hood).
while compiling
On 3/27/22 12:27 PM, JN wrote:
int* getX(T)(T t)
{
return
}
Remove this one. It's a bad idea. It probably won't compile, but if it
does, you will be using corrupted memory.
-Steve
On Sunday, 27 March 2022 at 17:46:54 UTC, Anonymouse wrote:
I installed Git for Windows which comes with the Msys terminal,
and I noticed writeln lines aren't being flushed on linebreaks
If the C library thinks it is talking to a pipe, it will switch
to block buffering instead of line
I installed Git for Windows which comes with the Msys terminal,
and I noticed writeln lines aren't being flushed on linebreaks. I
had this a long time ago and thought I fixed it with the
following, but I guess I never confirmed that it actually worked.
I'm not sure where I copied it from, a
Auto ref?
```D
int* getX(T)(auto ref T t)
{
...
```
I would like to have only one definition of getX if possible,
because they both are doing the same thing. I can't remove the
ref one, because without a ref it will pass the struct as a
temporary and compiler won't like that.
```d
import std.stdio;
struct Foo
{
int x;
void doStuff()
On Sunday, 27 March 2022 at 01:11:02 UTC, Steven Schveighoffer
wrote:
Not sure what the question here is,
Thanks for the reply. Actually, my problem was this, I forgot the
presence of `LargerOf!(A, B)` template function in that chapter.
When I see it in a function, I thought where is the
On Monday, 21 March 2022 at 17:30:31 UTC, Marcone wrote:
I hope one day the creators of the D programming language will
implement std.socket.ssl in the Phobos library.
I have to agree. For those just getting to grips with D there
are some things in the library that just make using them much
10 matches
Mail list logo