new DIP47: Outlining member functions of aggregates

Tove tove at fransson.se
Sun Sep 8 03:46:18 PDT 2013


Wouldn't this style be an acceptable compromise instead? with 
both declaration and definition 100% identical.

struct S
{
   // member function declarations
   static int mfunc1(int a, int b = 5) pure;
   static int mfunc2(int a, int b = 5) pure;
   static int mfunc3(int a, int b = 5) pure;

   // member function definitions
   static int mfunc1(int a, int b = 5) pure
   {
   }
   static int mfunc2(int a, int b = 5) pure
   {
   }
   static int mfunc3(int a, int b = 5) pure
   {
   }
}


More information about the Digitalmars-d mailing list