template condition

Namespace rswhite4 at googlemail.com
Thu Sep 27 06:01:07 PDT 2012


Is there any difference between these two code snippets:

#1:
struct Foo(T : Object) {

#2:
struct Foo(T) if (is(T == class)) {

?

I ask because I prefer option #1, but I see most often in Phobos 
variant #2.


More information about the Digitalmars-d-learn mailing list