The use of an is expression with the form `is(typeof(foo))`, such as in `static if(is(typeof(maybe_this_exists))`, is not documented in <http://dlang.org/expression.html#IsExpression> and is not an obvious composition of documented D features. Therefore, it would be nice if this was documented.
Well, it reads: --- Type is the type being tested. It must be syntactically correct, but it need not be semantically correct. If it is not semantically correct, the condition is not satisfied. --- Is it not enough?
That said I would prefer it to be extended to just `is(foo)` to check correctness of a declaration without needing typeof.
No, I don't think it is at all obvious from the description of `is` and from the description of `typeof` that we can use `is(typeof(foo))` to check whether foo exists and therefore can be used.
PR: https://github.com/dlang/dlang.org/pull/3357/
dlang/dlang.org pull request #3357 "Fix Issue 15286 - is(typeof(symbol))" was merged into master: - 8d86a16d4ef382f82c67f78b17f1cadd8dbd3121 by RazvanN7: Fix Issue 15286 - is(typeof(symbol)) https://github.com/dlang/dlang.org/pull/3357