https://dlang.org/spec/traits.html#getOverloads "The third argument is a bool, and is optional. If true, the result will also include template overloads." When I try this by running the example I get this: onlineapp.d(27): Error: expected 2 arguments for getOverloads but had 3 Line 27 is: ``` 27 foreach (t; __traits(getOverloads, D, "bar", true)) 28 writeln(t.stringof); ``` https://run.dlang.io/is/eahvvt I don't know whether it's the spec or implementation, but one of them is incorrect.
This feature is not yet released. You need DMD ~master or the nightly to test it. Unfortunately on run.dlang.io the nightly seems to be out of date but for example locally your paste works.
However it's true that the DDOC has been merged too eagerly, leading to confusion.