[swift-evolution] Epic: Typesafe calculations

Thorsten Seitz tseitz42 at icloud.com
Wed Jan 13 11:56:09 CST 2016


> Am 12.01.2016 um 23:49 schrieb Matt Whiteside via swift-evolution <swift-evolution at swift.org>:
> 
> struct InvertibleMatrix: SquareMatrix where determinant() != 0 
> //                       ^~~ 'restriction’ clause, i.e., not inheritance;
> //                       determinant() is executed at compile time,
> //                       since `entries` is a constexpr

Wouldn't that only work for literal matrices?

-Thorsten 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160113/40ee4e0f/attachment.html>


More information about the swift-evolution mailing list