www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21452] New: isCallable erroneously returns false on function


          Issue ID: 21452
           Summary: isCallable erroneously returns false on function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: qs.il.paperinik gmail.com

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.

Dec 03 2020