On 09/27/2012 03:01 PM, Namespace wrote:
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.
Yes there is:
struct S{
Object o;
alias o this;
}
#1 accepts S, #2 does not.
