On 2013-09-08, 12:46, Tove wrote:
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
{
}
}
The problem here is the compiler does not enforce that all
definitions are present in the declaration list. Apart from that, I
feel this is the correct solution to the problem.
--
Simen