Summary: Enhancement Request: Mixin Templates
           Product: D
           Version: future
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

--- Comment #0 from Simen Kjaeraas <> 2010-01-02 13:35:29 
PST ---
Currently, whenever you write a template to be mixed into another type, you
specify at the other type how to use the template. Most templates that are made
to be mixed in, will not be used in any other way. Hence, I propose that
templates may marked 'mixin' at declaration point, and 'mixin' be deemed
unnecessary at their point of use. 'mixin' should still be usable for unadorned
templates, and should be a no-op for mixin templates.

Proposed syntax:

mixin template foo( T ) {
  T x;

struct bar {
  foo!( int );

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to