Disable GC entirely
Dicebot
m.strashun at gmail.com
Mon Apr 8 02:17:20 PDT 2013
On Monday, 8 April 2013 at 09:15:50 UTC, Jacob Carlborg wrote:
> On 2013-04-08 09:53, Dicebot wrote:
>
>> Both blessing and curse of UDA's is that they are not part of
>> type and
>> thus mangling.
>
> Can't you just annotate a type:
>
> class Foo { }
>
> struct ThreadSafe (T)
> {
> T t;
> }
>
> ThreadSafe!(Foo) foo;
Yes, and that allows some powerful stuff on its own, I am aware
of it (and actually use sometimes). But a) it is not UDA ;) b)
You are forced to make function templated to mark it as @nogc.
Bad.
More information about the Digitalmars-d
mailing list