December 14, 2017
https://issues.dlang.org/show_bug.cgi?id=18075

          Issue ID: 18075
           Summary: DDOC_CONSTRAINT macro not applied to constraints that
                    aren't on functions
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: issues.dlang@jmdavisProg.com

For whatever reason, dmd currently fails to apply the DDOC_CONSTRAINT macro to any template constraint that is not on a function (or at least, I haven't found anything yet that it gets properly applied to that isn't a function). I found this out when trying to properly format the html generated by ddoc for my own code, but it's easily demonstrated by looking at dlang.org:

Function: https://dlang.org/phobos/std_array.html#appender
Struct: https://dlang.org/phobos/std_array.html#Appender
Template: https://dlang.org/phobos/std_algorithm_iteration.html#map

Notice that in the case of appender, the template constraint is indented on the line after the function and is in light grey (and apparently, mousing over it turns it black). However, in the case of Appender and map, the template constraint is on the same line as the struct or template and has the same color and formatting as the rest of the declaration (aside from the symbol name, which is in bold).

--