search of a workaround
monarch_dodra
monarchdodra at gmail.com
Sat Feb 9 00:13:15 PST 2013
On Friday, 8 February 2013 at 23:45:09 UTC, Namespace wrote:
> Thank you.
> But it looks ugly, and I dislike the use of such constructs for
> such simple feature.
> But cool thing. :D I like the meta stuff of D. :)
>
> Other favorites?
One of the advantages of using this approach though is that it
emulates auto ref. That means that if and when they get
implemented for non-temlates, you'll need minimal code change to
exploit it.
Also, instead of using the mixin, (indeed, kind of ugly), you
could just print out the "rvalue!foo" in a unittest block, and
copy paste it. It's boilerplate code, but copy paste is at least
a bit safer than hand writen. And more convenient.
On Friday, 8 February 2013 at 23:49:01 UTC, Namespace wrote:
> BTW: What's stopping you from using a class instead of a struct?
I that directed at me? I'm not sure how it relates?
More information about the Digitalmars-d-learn
mailing list