Created
February 10, 2015 17:29
-
-
Save ufcpp/2ab14318229e8d4e63fa to your computer and use it in GitHub Desktop.
tuple-to-tuple conversions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base {} | |
class Derived : Base {} | |
(Base x, Base y) a = (x: new Derived(), y: new Derived()); // covariance | |
(double sum, long count) b = (sum: 1, count: 2); // implicit conversion from int | |
(int s, int c) c = (sum: 1, count: 2); // renaming |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment