On Sunday, 17 December 2017 at 16:19:00 UTC, ag0aep6g wrote:
On Sunday, 17 December 2017 at 14:44:15 UTC, Alexandru Ermicioi
wrote:
Suppose:
struct F {
static void foo(T)(T i, int o) {}
}
enum bool check(T) = is(F.foo!T == void function(Z, int), Z);
enum correct = check!int;
-
On Sunday, 17 December 2017 at 14:44:15 UTC, Alexandru Ermicioi
wrote:
Suppose:
struct F {
static void foo(T)(T i, int o) {}
}
enum bool check(T) = is(F.foo!T == void function(Z, int), Z);
enum correct = check!int;
Upon running it will return false, though, by logic is
e
On 12/17/2017 06:44 AM, Alexandru Ermicioi wrote:
> It is interesting that it will not work with global functions as well:
>
>
> void foo(int i, double d) {};
> enum bool check = is(typeof(foo) == void function(int, double));
>
There, the address-of operator is missing. This wo
Hi,
Have someone tried to test a function against a signature using
is expression?
Suppose:
struct F {
static void foo(T)(T i, int o) {}
}
enum bool check(T) = is(F.foo!T == void function(Z, int), Z);
enum correct = check!int;
Upon running it will return false, though,