On Wed, 27 Jun 2012 16:16:53 -0400, Roman D. Boiko <[email protected]> wrote:

On Wednesday, 27 June 2012 at 20:15:43 UTC, Roman D. Boiko wrote:
On Wednesday, 27 June 2012 at 17:13:10 UTC, Timon Gehr wrote:
On 06/27/2012 03:56 PM, deadalnix wrote:
All is in the title.

I can do is(T : class) but not template(T : class) . Is this intended or
is it because it is ?

You cannot do is(T : class).

Why? According to grammar,

IsExpression:
is ( Type : TypeSpecialization )

and

The condition is satisfied if Type is semantically correct and it is the same as or can be implicitly converted to TypeSpecialization.
TypeSpecialization is only allowed to be a Type.<<<

Emphasis added.


TypeSpecialization:

Type struct union class interface enum function delegate super const immutable inout shared return

This is only valid for is( Type == TypeSpecialization)

-Steve

Reply via email to