What is the difference between these template declaration forms?

cc cc at nevernet.com
Sat May 15 08:37:21 UTC 2021


Are these identical?  Or is there a different usage for the (T : 
something) form?
```d
	auto opCast(T)() if (is(T == bool)) {
		return _obj !is null;
	}
```
```d
	auto opCast(T : bool)() {
		return _obj !is null;
	}
```



More information about the Digitalmars-d-learn mailing list