Difference between "can call" and "can compile"
WebFreak001
d.forum at webfreak.org
Tue Sep 15 14:18:20 UTC 2020
On Monday, 7 September 2020 at 14:57:24 UTC, Steven Schveighoffer
wrote:
> Consider a template function like this:
>
> void foo(T)(T v)
> {
> auto x = v.someProperty;
> }
>
> [...]
This is already possible from a library solution, see
https://forum.dlang.org/post/iribazqozceygujkvvjg@forum.dlang.org
However I imagine it is slow because of mixin operations + not
well defined because it uses stringof, but if you just want it in
some small project of yours you can just use that.
More information about the Digitalmars-d
mailing list