Right after allocators: containers or database connectivity?
Vlad Levenfeld via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 9 17:36:53 PDT 2015
On Wednesday, 10 June 2015 at 00:26:23 UTC, ZombineDev wrote:
> // Templatize a module by memory management strategy (and more).
> // Like specifying versions on the command-line, but
> // as powerful as templates:
>
> enum desired_mms = MMStrategy.refCounting;
> import image_processing!desired_mms : Image;
> // Image is a refcounted or GC class, depending on
> // the module template parameter
>
> [1]:
> http://beta.forum.dlang.org/thread/m0bdgg$1t7j$1@digitalmars.com
Why not something like
alias HashMap (T) = std.container.HashMap!(T,
MMStrategy.refCounting)
which is available now, just depends on how the template arts for
a given container are set up.
More information about the Digitalmars-d
mailing list