[Issue 19096] [REG 2.061] Proper error messages are not shown for templates that go beyond two deep, wrongly says no template overload matches

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 10 00:26:50 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19096

Nicholas Wilson <iamthewilsonator at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iamthewilsonator at hotmail.co
                   |                            |m

--- Comment #2 from Nicholas Wilson <iamthewilsonator at hotmail.com> ---
The usage of is(typeof(parse!T(value))) follows a common pattern in phobos:
namely to specify external dependencies of the function. (e.g. `all` has
`is(typeof(unaryFun!pred(range.front))` in its constraint)
toImpl uses parse and so specifies that in its constraint.

This has the obvious effect of invalidating the template's candidacy which is
needed because D doesn't do SFINAE. 

This is not a regression, just an unfortunate side effect of the above. On that
note, my DIP[1] would make it immediately obvious that parse!T(value) is where
the problem lies.

[1]: https://github.com/dlang/DIPs/pull/131

--


More information about the Digitalmars-d-bugs mailing list