Fact checking for my talk
ag0aep6g via Digitalmars-d
digitalmars-d at puremagic.com
Sat Aug 13 05:58:36 PDT 2016
On 08/13/2016 02:47 PM, Ethan Watson wrote:
> | Rust | Swift | C# |
> -----------------------------|---------+---------+---------|
> Template Constraints | Y | Y | where | [1]
> -----------------------------|---------+---------+---------|
> Template "if" Constraints | where | where | where |
What's a 'template "if" constraint'? Template constraints already use
the `if` keyword. This is a template constraint:
template Foo(T) if (is(T : int)) {/* ... */}
Other than those, there are template specializations. Example:
template Foo(T : int) {/* ... */}
More information about the Digitalmars-d
mailing list