www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24397] New: Support C preprocessor function-like macros

https://issues.dlang.org/show_bug.cgi?id=24397

          Issue ID: 24397
           Summary: Support C preprocessor function-like macros
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

Macros like:

    #define abc(a, b) a + b

can be replaced with:

    auto abc(T1, T2)(T1 a, T2 b) { return a + b; }

--
Feb 16