D without a GC
Jonathan M Davis
jmdavisProg at gmx.com
Mon Jan 3 20:07:37 PST 2011
On Monday 03 January 2011 19:42:21 Christopher Bergqvist wrote:
> Would std.typecons.scoped!(T) fit?
>
> http://svn.dsource.org/projects/phobos/trunk/phobos/std/typecons.d
>
> I can't figure out why it's not in the generated reference docs, but exists
> in the source. Maybe it hasn't been tested enough yet.
I believe that it's the replacement for using scope on local variables, which is
going away. Essentially, it makes it so that the object is on the stack instead
of on the heap, and it's destroyed when the object goes out of scope. It's an
unsafe feature, and the library solution is quite new, I believe, so I'm not
sure that it's really supposed to show up in the docs yet. However, it returns
out, which currently _never_ shows up in ddoc-generated files due to a bug in
ddoc. So, even if it were fully ready for use and tested to death, it still
wouldn't show up in the documentation.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list