3 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...struct Parent {
void method1() {
method3();
}
void method2() {
}
void method3() {
}
}
struct Child : Parent {
override void method2... | |||
3 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...d
struct Parent {
void method1() {
method2();
}
void method2() {
}
}
struct Child : Parent {
override void method2() {
}
}
```
My... | |||
3 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
```
void serialize(byte[] o, string s){}
struct MyDto
{
struct SerializerAspect
{
static void serialize(byte[] o... | |||
3 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...Parent {
void methB(string s) {
writeln("MethB(P) ", s, " ", typeof(this).stringof);
methC(s);
}
void... | |||
3 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...methB;
}
class Parent {
void methB() {
writeln("MethB(P) ", typeof(this).stringof);
methC();
}
void methC() {
writeln... | |||
3 days ago General » Re: Something like ADL from C++? | |||
|---|---|---|---|
| |||
...S){ return [2]; }
```
```d
import default_serialise;
void main(){
import std;
static struct Dummy{
import... | |||
3 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...class Parent {
void method() {
writeln(typeof(this).stringof);
}
}
class Child : Parent {
override void method() {
super... | |||
4 days ago DIP Ideas » Re: Struct inheritance | |||
|---|---|---|---|
| |||
...bool lockit(struct Lock *);
struct Foo {
...
Lock;
...
};
void something(/* ... */)
{
struct Foo *foo = something_returning_Foo... | |||
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++? | |||
|---|---|---|---|
| |||
...void serialise(void[], A)
{
import std.stdio;
writeln("A.serialize");
}
---
module b;
struct B
{
}
void... | |||
Copyright © 1999-2021 by the D Language Foundation