3 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...as its class, not a child.
```d
import std.stdio;
void main() {
Child child = new... | |||
4 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
...d
```d
module app;
import std.stdio;
void main()
{
import serialise;
import std : writeln;
writeln... | |||
4 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
...47 UTC, Max Samukha wrote: The static import is a leftover from a previous iteration... | |||
4 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
...import std.stdio;
writeln("A.serialize");
}
---
module b;
struct B
{
}
void serialise(void[], B)
{
import... | |||
4 days ago General » Something like ADL from C++? | |||
|---|---|---|---|
| |||
...thingMod = getModuleForThing!thing;
mixin(import " ~ thingMod ~ ";");
import default_serialise : serialise; // re-import at inner scope... | |||
4 days ago Learn » Re: volatile struct definition for peripheral control registers | |||
|---|---|---|---|
| |||
...make everything happy:
```d
module myproj.volatile;
import core.volatile;
struct Volatile(T)
{
private T... | |||
4 days ago Learn » Re: volatile struct definition for peripheral control registers | |||
|---|---|---|---|
| |||
...in the data } import std.range : chunks, put; import std.string : format; import std.stdio... | |||
5 days ago Learn » volatile struct definition for peripheral control registers | |||
|---|---|---|---|
| |||
...T)` struct template:
```d
module myproj.volatile;
import core.volatile;
struct Volatile(T)
{
T v... | |||
5 days ago Learn » Search on Shared array and return | |||
|---|---|---|---|
| |||
...as shared and as not shared ? ```d import std.stdio; shared User[] users; shared class... | |||
5 days ago Learn » Re: Variable modified by different threads. | |||
|---|---|---|---|
| |||
...the best method? ```d import core.thread; import core.atomic; import core.sync.mutex; struct... | |||
Copyright © 1999-2021 by the D Language Foundation