This seems to work:
----
struct RefVal(T) {
private T* ptr;
this(T* val) {
ptr = val;
}
ref auto opAssign(U)(auto ref U value) {
*ptr = value;
return *ptr;
}
auto get() inout {
return ptr;
}
}
----
Re: How to make a transparent wrapper type?
Namespace via Digitalmars-d-learn Mon, 07 Dec 2015 12:06:56 -0800
- How to make a transparent wrapper ty... Random D user via Digitalmars-d-learn
- Re: How to make a transparent w... Namespace via Digitalmars-d-learn
- Re: How to make a transpare... Random D user via Digitalmars-d-learn
- Re: How to make a trans... Random D user via Digitalmars-d-learn
