On Wednesday, 13 March 2019 at 21:04:01 UTC, Johan Engelen wrote:
On Wednesday, 13 March 2019 at 20:57:13 UTC, Denis Feklushkin
wrote:
import std.stdio;
struct S { int x; }
ref S func1(ref S i) // i is reference
{
return i;
}
ref S func2(S i) // i is not reference
{
return func1(i); //
On Wednesday, 13 March 2019 at 20:57:13 UTC, Denis Feklushkin
wrote:
import std.stdio;
struct S { int x; }
ref S func1(ref S i) // i is reference
{
return i;
}
ref S func2(S i) // i is not reference
{
return func1(i); // Works! Possibility to return reference to
local object i?
Indeed
import std.stdio;
struct S { int x; }
ref S func1(ref S i) // i is reference
{
return i;
}
ref S func2(S i) // i is not reference
{
return func1(i); // Works! Possibility to return reference to
local object i?
//return i; // Error: returning i escapes a reference to
parameter i
}
vo
On Wednesday, 13 March 2019 at 17:38:02 UTC, Victor Porton wrote:
Why this template code does not compile?
///
module runnable;
import std.meta;
import std.typecons;
template FieldInfo(argT, string argName) {
template FieldInfo(Nullable!argT argDefault =
Nullable!argT()) {
}
}
alias
Why this template code does not compile?
///
module runnable;
import std.meta;
import std.typecons;
template FieldInfo(argT, string argName) {
template FieldInfo(Nullable!argT argDefault =
Nullable!argT()) {
}
}
alias processFields(T, string name) =
AliasSeq!(FieldInfo!(T, name)(
On Wednesday, 13 March 2019 at 13:03:27 UTC, tchaloupka wrote:
Is this expected?:
You never called the constructor, which means it was lazy
initialized... but that was done inside one of the functions,
which received the Appender by value.
So when it set its internal pointer, it was inside
On Wednesday, 13 March 2019 at 13:03:27 UTC, tchaloupka wrote:
Is this expected?:
```
import std.stdio;
import std.algorithm;
import std.array;
void main()
{
auto d = Appender!string();
//auto d = appender!string(); // works
string[] arr = ["foo", "bar", "baz"];
arr.joiner("\n"
Is this expected?:
```
import std.stdio;
import std.algorithm;
import std.array;
void main()
{
auto d = Appender!string();
//auto d = appender!string(); // works
string[] arr = ["foo", "bar", "baz"];
arr.joiner("\n").copy(d);
writeln(d.data);
}
```
Using Appender outpust no
On Tuesday, 12 March 2019 at 15:48:14 UTC, Ron Tarrant wrote:
I managed to get dexed to compile a single-file dub project,
but for completeness sake, I'm also trying to configure it to
use dmd (non-dub) to compile GtkD projects using Compilation
(menu) > Compile File and Run.
To that end, I h
On Tuesday, 12 March 2019 at 21:54:36 UTC, JN wrote:
How about Project -> Project editor -> Categories -> Other ->
dmdOtherOptions ?
I take it this starts in the Project menu? I found Project Editor
in the Project menu, but the rest eludes me. Can't find it.
10 matches
Mail list logo