On Tue, 08 Mar 2011 15:25:27 -0500, Steven Schveighoffer wrote: > "Hey, wouldn't it be cool if I could add a custom allocator to all > classes!?"... > > class Collection(T, alloc = DefaultAllocator!T) { > Collection!(T) add(T t) { ...; return this; } // 20 other now subtly > incorrect functions like add... > } > > See the problem?
This seems like a good reason to keep allowing the feature. It would be nice if it could be documented clearly somewhere, maybe here: http://www.digitalmars.com/d/2.0/template.html#ClassTemplateDeclaration