Documentation: is it intentional that template constraints are displayed after the signature?

Tobias Pankrath tobias+dlang at pankrath.net
Fri Nov 1 11:02:56 UTC 2019


On Friday, 1 November 2019 at 09:17:03 UTC, Dennis wrote:
> Template constraints are not allowed before the signature in 
> the language, so it can be expected the documentation does not 
> swap that order.
>
> On Thursday, 31 October 2019 at 13:34:35 UTC, Tobias Pankrath 
> wrote:
>> I was confused at first by the trailing
>>
>>  if (!is(T == struct) && !is(T == interface) && !is(T == 
>> class) && !__traits(isStaticArray, T));
>
> Or are you confused by the newline between the ) and the if?
> I do think the indentation is a bit confusing, but I don't know 
> a better one.
> I always have difficulty myself when trying to cleanly format 
> long signatures of template functions.

Ah yes, now I see it.


More information about the Digitalmars-d-learn mailing list