Nested function declarations
Dan Olson
zans.is.for.cans at yahoo.com
Sun Jan 30 14:59:54 PST 2011
dennis luehring <dl.soluz at gmx.net> writes:
>> They're useful for testing:
>>
>> unittest {
>> int foo();
>> static assert (is(ReturnType!foo == int));
>> }
>
> and else? is it worth?
Don't class function declarations have the same issue? You can declare
but all you'll get is a link error. Unless there some way like C++ to
provide a definition elsewhere.
class C
{
int foo();
}
void main()
{
}
superarray_error.obj(superarray_error)
Error 42: Symbol Undefined _D16superarray_error1C3fooMFZi
--- errorlevel 1
More information about the Digitalmars-d-learn
mailing list