Bug 21452 – isCallable erroneously returns false on function templates

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-12-03T21:32:46Z
Last change time
2020-12-04T00:09:26Z
Keywords
pull
Assigned to
No Owner
Creator
Bolpat

Comments

Comment #0 by qs.il.paperinik — 2020-12-03T21:32:46Z
https://dlang.org/phobos/std_traits.html#isCallable reads: Detect whether T is a callable object, which can be called with the function call operator (...). However, function templates f that can be called using f!() aren't considered isCallable!f, but certainly can. The case of function templates that can infer their arguments from run-time arguments won't be easy or even possible.
Comment #1 by dlang-bot — 2020-12-03T21:35:19Z
@Bolpat created dlang/phobos pull request #7722 "fix Issue 21452 - isCallable erroneously returns false on function templates" fixing this issue: - fix Issue 21452 - isCallable erroneously returns false on function templates https://github.com/dlang/phobos/pull/7722
Comment #2 by dlang-bot — 2020-12-04T00:09:26Z
dlang/phobos pull request #7722 "fix Issue 21452 - isCallable erroneously returns false on function templates" was merged into master: - 027612038cc5c09802707f3dd497d90489009dd3 by Q. F. Schroll: fix Issue 21452 - isCallable erroneously returns false on function templates https://github.com/dlang/phobos/pull/7722